/home/techb158/balavpn.abdallabala.com/.next/cache/webpack/edge-server-production
NameSizeModeActions
0.pack20708560666editdlrm
1.pack304300666editdlrm
2.pack76527760666editdlrm
index.pack9491810666editdlrm
index.pack.old9491520666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/.next/cache/webpack/edge-server-production/2.pack (7652776B)
wpctwebpack/lib/cache/PackFileCacheStrategyPackContentItems kResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\head.js=|next/dist/client/components/noop-head|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\image.js=|next/dist/api/image|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\constants.js=|next/dist/api/constants|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\router.js=|next/dist/api/router|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dynamic.js=|next/dist/api/app-dynamic|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\script.js=|next/dist/api/script|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\link.js=|next/dist/client/app-dir/link|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\form.js=|next/dist/client/app-dir/form|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\navigation.js=|next/dist/api/navigation.react-server|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\headers.js=|next/dist/api/headers|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\og.js=|next/dist/api/og|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\server.js=|next/dist/api/server|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\document.js=|next/dist/api/document|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\app.js=|next/dist/api/app|next=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next|]|fallback=[|process=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\polyfills\process.js|]|dependencyType=|esm|path=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app|request=|private-next-root-dir/src/middleware.jsCompilation/modules|javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js|middlewareFlagDependencyExportsPlugin|javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js|middlewareCompilation/codeGeneration|javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware|5fc5bfa4b584fa97|edge-runtime-webpackCompilation/assets|chunk550MinifierWebpackPlugin|src/middleware.jsSourceMapDevToolPlugin|src/middleware.jswebpack/lib/cache/ResolverCachePlugin`_ResolverCachePluginCacheMisscontextpathrequestqueryfragmentmoduledirectoryfileinternalfullySpecifieddescriptionFilePathdescriptionFileDatadescriptionFileRootrelativePath__innerRequest_request__innerRequest_relativePath__innerRequest issuerissuerLayercompilermiddlewareedge-serverC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\package.jsonnameversionprivatedescriptionscriptsdependenciesdevDependenciesenginescosmic-ai-risk-saas0.1.0 Commercial SaaS rebuild of the COSMIC AI-Risk Dashboard with multi-tenant workspaces, PostgreSQL, Prisma, invite-only auth, billing entitlements, and enterprise-ready boundaries.`devbuildstartlinttestprisma:generatedb:migratedb:pushdb:seedcheck:configtest:locallocal:fallbackmock-oidcdev:ssosso:setupnext dev -p 8091next buildnext start -p 8091next lintnode tests/saas-domain.test.js && node tests/tenant-security.test.js && node tests/idempotency.test.js && node tests/metrics.test.js && node tests/oidc.test.js && node tests/rate-limit.test.js && node tests/integration-service.test.jsprisma generateprisma migrate deployprisma db pushnode prisma/seed.jsnode scripts/check-config.jsnode tests/local-server.test.jsnode local-server.jsnode mock-oidc-provider.jsnode mock-oidc-provider.js & npm run dev@prisma/clientbcryptjsioredisnextreactreact-domstripezod^5.22.0^2.4.3^5.11.1^15.0.3^19.0.0^17.3.1^3.23.8eslinteslint-config-nextprisma^9.14.0node>=20.11.0C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app./src/middleware.jswebpack/lib/FileSystemInfoSnapshot@ v)yB` C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\srcC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk DashboardC:\Users\abd_b\OneDriveC:\Users\abd_b\OneDrive\DesktopC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission FreezeC:\Users\abd_bC:\C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\applicationC:\UserssafeTimetimestamphash! "yB"yBcfd89ca25aa7c463!yByB13b98c72f42c0046C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\package.json webpack/lib/NormalModulewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; 6webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./src/middleware.js|middleware{"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings":"AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAAKK,GAAG,CAACI,KAAKQ,MAAM,CAACC,CAAAA,IAAKN,MAAMM,IAAIP;IACvDK,WAAWG,IAAI,CAACP;IAChBZ,KAAKe,GAAG,CAACN,KAAKO;IACd,OAAO;QACLI,SAASJ,WAAWK,MAAM,IAAIX;QAC9BY,WAAWC,KAAKb,GAAG,CAAC,GAAGA,MAAMM,WAAWK,MAAM;QAC9CG,OAAOD,KAAKE,IAAI,CAACb,MAAM,QAAQW,KAAKE,IAAI,CAACd,WAAW;IACtD;AACF;AAEA,OAAO,SAASe,WAAWvB,OAAO;IAChC,MAAM,EAAEwB,QAAQ,EAAE,GAAGxB,QAAQyB,OAAO;IACpC,IAAI,CAACD,SAASE,UAAU,CAAC,UAAU,OAAOhC,aAAaiC,IAAI;IAE3D,MAAMC,KAAK7B,YAAYC;IACvB,MAAM6B,WAAWC,QAAQC,GAAG,CAACC,SAAS,IAAIF,QAAQC,GAAG,CAACE,oBAAoB,KAAK;IAE/E,IAAI,CAACJ,UAAU;QACb,MAAMK,SAAS7B,oBAAoB,CAAC,GAAG,EAAEuB,IAAI;QAC7C,IAAI,CAACM,OAAOjB,OAAO,EAAE;YACnB,OAAO,IAAIvB,aAAayC,KAAKC,SAAS,CAAC;gBAAEC,OAAO;YAAwC,IAAI;gBAC1FC,QAAQ;gBACRrC,SAAS;oBACP,gBAAgB;oBAChB,qBAAqBsC,OAAO3C;oBAC5B,yBAAyB;oBACzB,qBAAqB2C,OAAOL,OAAOb,KAAK;oBACxC,iBAAiB;gBACnB;YACF;QACF;QACA,MAAMmB,WAAW9C,aAAaiC,IAAI;QAClCa,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAO3C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,aAAaiC,IAAI;AAC1B;AAEA,OAAO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAE","file":"x"}exportsTypenamespace javascript/autoaliasmainFieldsconditionNamesxfallback`)server-only$client-only$next/dist/compiled/server-only$next/dist/compiled/client-only$C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\head.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\image.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\constants.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\router.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dynamic.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\script.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\link.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\form.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\navigation.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\headers.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\og.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\server.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\document.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\app.jsreact$react/compiler-runtime$react/jsx-dev-runtime$react/jsx-runtime$react-dom$react-dom/client$react-dom/server$react-dom/server.browser$react-dom/server.edge$react-dom/static$react-dom/static.browser$react-dom/static.edge$react-server-dom-webpack/client$react-server-dom-webpack/server$react-server-dom-webpack/server.node$react-server-dom-webpack/static$next/dist/compiled/react$next/dist/compiled/react/compiler-runtime$next/dist/compiled/react/jsx-dev-runtime$next/dist/compiled/react/jsx-runtime$next/dist/compiled/react-dom$@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.tsnext/dist/compiled/server-only/emptynext/dist/compiled/client-only/errornext/dist/client/components/noop-headnext/dist/api/imagenext/dist/api/constantsnext/dist/api/routernext/dist/api/app-dynamicnext/dist/api/scriptnext/dist/client/app-dir/linknext/dist/client/app-dir/formnext/dist/api/navigation.react-servernext/dist/api/headersnext/dist/api/ognext/dist/api/servernext/dist/api/documentnext/dist/api/appnext/dist/compiled/react/react.react-servernext/dist/compiled/react/compiler-runtimenext/dist/compiled/react/jsx-dev-runtime.react-servernext/dist/compiled/react/jsx-runtime.react-servernext/dist/compiled/react-dom/react-dom.react-servernext/dist/compiled/react-dom/clientnext/dist/build/webpack/alias/react-dom-server.jsnext/dist/compiled/react-dom/server.browsernext/dist/compiled/react-dom/static.edgenext/dist/compiled/react-dom/static.browsernext/dist/compiled/react-server-dom-webpack/client.edgenext/dist/compiled/react-server-dom-webpack/server.edgenext/dist/compiled/react-server-dom-webpack/server.nodenext/dist/compiled/react-server-dom-webpack/static.edgenext/dist/client/dev/noop-turbopack-hmrC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\nextedge-light... react-server processC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\polyfills\process.js `cacheableparsedfileDependenciescontextDependenciesmissingDependenciesbuildDependenciesvalueDependenciesassetsassetsInforscstrictexportsArgumentimportLocByPathtopLevelDeclarationssnapshot webpack/lib/util/LazySetC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.jsC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.jswebpack/DefinePlugin_hashdc59a62a422c92f97496f35atypeactionIdsclientRefsclientEntryTypeisClientRefserver  __webpack_exports__next/serversourcePositionsourceContentlinecolumnsourceljavascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-loader\index.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\middleware.js|middlewareimport { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; getClientIpcheckRateLimitLocalWINDOW_MSMAX_PER_WINDOWhitsconfig l)yB Wwebpack/lib/dependencies/HarmonyCompatibilityDependency dwebpack/lib/dependencies/ConstDependency`+ `+webpack/lib/dependencies/HarmonyExportHeaderDependency A A c0 A A c13 webpack/lib/dependencies/HarmonyImportSideEffectDependency `+webpack/lib/dependencies/HarmonyExportSpecifierDependency@ c0webpack/lib/dependencies/HarmonyImportSpecifierDependencya NextResponse Ahy  Aht   c.?  A 4 c#  A  A   c))*  A  A   c/ / c13 webpack/lib/ModuleGraphRestoreProvidedData  providedcanMangleProvideterminalBindingexportsInfo  sourcesdataruntimeRequirementsjavascriptwebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSource@webpack/lib/util/registerExternalSerializerwebpack-sources/RawSource// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceexport async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } export async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; export function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (process.env.NEXT_RUNTIME !== 'edge') { return; } // The condition is true when the "process" module is provided if (process !== global.process) { // prefer local process but global.process has correct "env" process.env = global.process.env; global.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middlewareM   j o false{}__webpack_require__.gbuffersourcesizemapshashasync function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (false) {} // The condition is true when the "process" module is provided if (process !== __webpack_require__.g.process) { // prefer local process but global.process has correct "env" process.env = __webpack_require__.g.process.env; __webpack_require__.g.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.map {"finalSource":false}mapbufferedMapversionfilemappingssourcessourcesContentnamesxAAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEAUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middlewareexport async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } export async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; export function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (process.env.NEXT_RUNTIME !== 'edge') { return; } // The condition is true when the "process" module is provided if (process !== global.process) { // prefer local process but global.process has correct "env" process.env = global.process.env; global.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.mapReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware06undefined924930undefined15491555undefined32863320falseundefined33233345{}undefined34343439__webpack_require__.gundefined35433548__webpack_require__.gundefined35713576__webpack_require__.gundefined6 ;// ./node_modules/next/dist/esm/server/web/error.js  ewebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceSexport class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } export class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } export class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.mapSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewareC`fFL>class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map xAAAO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEASwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewareSexport class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } export class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } export class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map|webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware06undefined352358undefined582588undefined3 ;// ./node_modules/next/dist/esm/lib/constants.js  1&webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; export const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; export const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; export const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; export const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; export const MATCHED_PATH_HEADER = 'x-matched-path'; export const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; export const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; export const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; export const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; export const RSC_SEGMENT_SUFFIX = '.segment.rsc'; export const RSC_SUFFIX = '.rsc'; export const ACTION_SUFFIX = '.action'; export const NEXT_DATA_SUFFIX = '.json'; export const NEXT_META_SUFFIX = '.meta'; export const NEXT_BODY_SUFFIX = '.body'; export const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; export const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; export const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; export const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well export const NEXT_CACHE_TAG_MAX_ITEMS = 128; export const NEXT_CACHE_TAG_MAX_LENGTH = 256; export const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; export const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds export const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. export const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files export const MIDDLEWARE_FILENAME = 'middleware'; export const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`; // Pattern to detect instrumentation hooks file export const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias export const PAGES_DIR_ALIAS = 'private-next-pages'; export const DOT_NEXT_ALIAS = 'private-dot-next'; export const ROOT_DIR_ALIAS = 'private-next-root-dir'; export const APP_DIR_ALIAS = 'private-next-app-dir'; export const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; export const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; export const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; export const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; export const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; export const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; export const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`; export const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`; export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`; export const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`; export const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`; export const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`; export const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; export const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; export const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.'; export const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`; export const NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`; export const SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`; export const ESLINT_DEFAULT_DIRS = [ 'app', 'pages', 'components', 'lib', 'src' ]; export const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; export { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }; //# sourceMappingURL=constants.js.mapPwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middlewaredO= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ export function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ export function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ export function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.mapSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware`^Mflfl<__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._K /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ function normalizeNextQueryParam(key) { const prefixes = [ __WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__._, __WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._ ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map xKAAA+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,yDAAyD;AACzD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN,mEAAmE,YAAY;AAC/E;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA,QAAQ,8GAAuB;AAC/B,QAAQ,8HAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEASwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middlewareimport { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants'; /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ export function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ export function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ export function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ export function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware094undefined447453undefined16891695undefined39423948undefined47104716undefined52955301undefined53735395__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__._undefined54065436__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._undefinedC{pNEXT_QUERY_PARAM_PREFIXNEXT_INTERCEPTION_MARKER_PREFIXK ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js  q webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { PageSignatureError } from '../error'; const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } export function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } export class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.maphwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware`-G`fM^ __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._8 const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.map xAAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gHAAgH;AAChH;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEAhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware import { PageSignatureError } from '../error'; const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } export function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } export class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware045undefined14491455undefined16321638undefined21252142__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined25292546__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefinedCt Z PageSignatureErrorJ ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map gwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js|middleware{"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,AAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAAA,AAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0],"file":"x"}function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map xAAEO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,KAAM,gBAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,QACjDC,gBAAAA,KAAKK,OAAAA,KAAO,gBAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACFwebpack://../../../../src/shared/lib/i18n/detect-domain-locale.tsimport type { DomainLocale } from '../../../server/config-shared' export function detectDomainLocale( domainItems?: readonly DomainLocale[], hostname?: string, detectedLocale?: string ) { if (!domainItems) return if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase() } for (const item of domainItems) { // remove port if present const domainHostname = item.domain?.split(':', 1)[0].toLowerCase() if ( hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale) ) { return item } } } ` detectDomainLocaledomainItemshostnamedetectedLocaletoLowerCaseitemdomainHostnamedomainsplitdefaultLocalelocalessomelocaleReplaceSourceSourceMapSourceexport function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,AAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAAA,AAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0],"file":"x"}false06undefinedS ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceL/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map pwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js|middleware\{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0],"file":"x"}AzE/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map {~xRAAAA;;;;;;CAMC,GACM,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrCwebpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route: string) { return route.replace(/\/$/, '') || '/' } removeTrailingSlashroutereplaceL/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map \{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0],"file":"x"}false191197undefinedH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js  _ webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceI/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0],"file":"x"}AdB/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ehoxAAAA;;;;CAIC,GACM,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/Cwebpack://../../../../../src/shared/lib/router/utils/parse-path.ts/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path: string) { const hashIndex = path.indexOf('#') const queryIndex = path.indexOf('?') const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex) if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '', } } return { pathname: path, query: '', hash: '' } } ` parsePathpathhashIndexindexOfqueryIndexhasQuerypathnamesubstringqueryundefinedSsliceI/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0],"file":"x"}false207213undefinedM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { parsePath } from './parse-path'; /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map jwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;CAGC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0],"file":"x"}`(C?G__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._F /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = __WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map GJQxAAAwC;AAExC;;;CAGC,GACM,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,uFAASA,CAACE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxCwebpack://../../../../../src/shared/lib/router/utils/add-path-prefix.tsimport { parsePath } from './parse-path' /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path: string, prefix?: string) { if (!path.startsWith('/') || !prefix) { return path } const { pathname, query, hash } = parsePath(path) return `${prefix}${pathname}${query}${hash}` } addPathPrefixprefixstartsWith<import { parsePath } from './parse-path'; /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;CAGC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined164170undefined319327__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefinedAeM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js  =webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { parsePath } from './parse-path'; /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map jwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;CAIC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0],"file":"x"}`(Cy__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._0 /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = __WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map 14;xAAAwC;AAExC;;;;CAIC,GACM,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,uFAASA,CAACE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxCwebpack://../../../../../src/shared/lib/router/utils/add-path-suffix.tsimport { parsePath } from './parse-path' /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path: string, suffix?: string) { if (!path.startsWith('/') || !suffix) { return path } const { pathname, query, hash } = parsePath(path) return `${pathname}${suffix}${query}${hash}` } ̍addPathSuffix̆suffix'import { parsePath } from './parse-path'; /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;CAIC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined222228undefined377385__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefinedAIM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceSimport { parsePath } from './parse-path'; /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map jwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,UAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0],"file":"x"}`(CHN__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._q /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = __WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map &xAAAwC;AAExC;;;;;;CAMC,GACM,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,uFAASA,CAACE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7Dwebpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts)import { parsePath } from './parse-path' /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path: string, prefix: string) { if (typeof path !== 'string') { return false } const { pathname } = parsePath(path) return pathname === prefix || pathname.startsWith(prefix + '/') } pathHasPrefixSimport { parsePath } from './parse-path'; /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,UAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0],"file":"x"}false040undefined328334undefined463471__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefinedAH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { addPathPrefix } from './add-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map ewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AAEjD;;;;CAIC,GACD,OAAO,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,cAAcM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,cAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,cAAcG,MAAO,MAAGC;AACjC","ignoreList":[0],"file":"x"}b13dGQW 6B__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._ /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(lower, '/api')) return path; if (__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return __WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map  xAAAiD;AACA;AAEjD;;;;CAIC,GACM,SAASE,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,gGAAaA,CAACM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,gGAAaA,CAACM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,+FAAaA,CAACG,MAAO,MAAGC;AACjCwebpack://../../../../../src/shared/lib/router/utils/add-locale.tsimport { addPathPrefix } from './add-path-prefix' import { pathHasPrefix } from './path-has-prefix' /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale( path: string, locale?: string | false, defaultLocale?: string, ignorePrefix?: boolean ) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path const lower = path.toLowerCase() // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path } // Add the locale prefix to the path. return addPathPrefix(path, `/${locale}`) }  addLocalewtignorePrefixlowermvimport { addPathPrefix } from './add-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AAEjD;;;;CAIC,GACD,OAAO,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,cAAcM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,cAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,cAAcG,MAAO,MAAGC;AACjC","ignoreList":[0],"file":"x"}zfalse049undefined51100undefined337343undefined767779__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined822834__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined944956__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefinedE}IW ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { removeTrailingSlash } from './remove-trailing-slash'; import { addPathPrefix } from './add-path-prefix'; import { addPathSuffix } from './add-path-suffix'; import { addLocale } from './add-locale'; export function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map twebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js|middleware/{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;AAOxC,OAAO,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,UACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,oBAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,cACTD,cAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,cAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,cAAcI,UAAU,OACxBA,WACFN,oBAAoBM;AAC1B","ignoreList":[0],"file":"x"}e =?prR & 5G__WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._ function formatNextPathnameInfo(info) { let pathname = __WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__._(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = __WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._(pathname); } if (info.buildId) { pathname = __WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = __WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? __WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._(pathname, '/') : pathname : __WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map x%AAC6D;AACZ;AACA;AACT;AAOjC,SAASI,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,wFAASA,CACtBE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,2GAAmBA,CAACM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,+FAAaA,CACtBD,+FAAaA,CAACK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,+FAAaA,CAACK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,+FAAaA,CAACI,UAAU,OACxBA,WACFN,2GAAmBA,CAACM;AAC1Bwebpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts+import type { NextPathnameInfo } from './get-next-pathname-info' import { removeTrailingSlash } from './remove-trailing-slash' import { addPathPrefix } from './add-path-prefix' import { addPathSuffix } from './add-path-suffix' import { addLocale } from './add-locale' interface ExtendedInfo extends NextPathnameInfo { defaultLocale?: string ignorePrefix?: boolean } export function formatNextPathnameInfo(info: ExtendedInfo) { let pathname = addLocale( info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix ) if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname) } if (info.buildId) { pathname = addPathSuffix( addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json' ) } pathname = addPathPrefix(pathname, info.basePath) return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname) } `wformatNextPathnameInfoinfo`buildId\trailingSlashbasePathendsWith]import { removeTrailingSlash } from './remove-trailing-slash'; import { addPathPrefix } from './add-path-prefix'; import { addPathSuffix } from './add-path-suffix'; import { addLocale } from './add-locale'; export function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map /{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;AAOxC,OAAO,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,UACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,oBAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,cACTD,cAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,cAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,cAAcI,UAAU,OACxBA,WACFN,oBAAoBM;AAC1B","ignoreList":[0],"file":"x"}_false061undefined63112undefined114163undefined165205undefined207213undefined273281__WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__._undefined444462__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined524536__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined538550__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined664676__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined779791__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined821839__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined`?L9?Ao4Rgg= ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource/** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map Zwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/get-hostname.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,AAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0],"file":"x"}A/** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map x\AAEA;;;;;CAKC,GACM,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,KAAQ,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7Bwebpack://../../../src/shared/lib/get-hostname.tsimport type { OutgoingHttpHeaders } from 'http' /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname( parsed: { hostname?: string | null }, headers?: OutgoingHttpHeaders ): string | undefined { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname: string if (headers?.host && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0] } else if (parsed.hostname) { hostname = parsed.hostname } else return return hostname.toLowerCase() }  getHostnameparsedheaders:C/** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,AAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0],"file":"x"}false274280undefinedK ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js  swebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource/** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map hwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js|middleware {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":"AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0],"file":"x"}A"/** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map xAAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACM,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpCwebpack://../../../../src/shared/lib/i18n/normalize-locale-path.tsexport interface PathLocale { detectedLocale?: string pathname: string } /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap() /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath( pathname: string, locales?: readonly string[] ): PathLocale { // If locales is undefined, return the pathname as is. if (!locales) return { pathname } // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales) if (!lowercasedLocales) { lowercasedLocales = locales.map((locale) => locale.toLowerCase()) cache.set(locales, lowercasedLocales) } let detectedLocale: string | undefined // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2) // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname } // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase() // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment) if (index < 0) return { pathname } // Return the case-sensitive locale. detectedLocale = locales[index] // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/' return { pathname, detectedLocale } } `cacheWeakMapnormalizeLocalePath]*lowercasedLocalesget*"set segments$segmentindexT[length&/** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map  {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":"AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0],"file":"x"}false540546undefinedP ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource6import { pathHasPrefix } from './path-has-prefix'; /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map mwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AAEjD;;;;;;;CAOC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,cAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACb","ignoreList":[0],"file":"x"}`1Chn(__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._P /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map xAAAiD;AAEjD;;;;;;;CAOC,GACM,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,gGAAaA,CAACE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACbwebpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.tsimport { pathHasPrefix } from './path-has-prefix' /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path: string, prefix: string): string { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length) // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return `/${withoutPrefix}` } removePathPrefix=[withoutPrefixE[6import { pathHasPrefix } from './path-has-prefix'; /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AAEjD;;;;;;;CAOC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,cAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACb","ignoreList":[0],"file":"x"}false049undefined360366undefined796808__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefinedABzT ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js  k webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcenimport { normalizeLocalePath } from '../../i18n/normalize-locale-path'; import { removePathPrefix } from './remove-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; export function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map qwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js|middleware_{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aAAa,QAAQ,oBAAmB;AAkDjD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAAgB;QAE0BA;IAA1C,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,CAAAA,sBAAAA,QAAQI,UAAAA,AAAU,KAAA,OAAlBJ,sBAAsB,CAAC;IACjE,MAAMK,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAAMA,SAASO,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H,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0],"file":"x"}bFHK$Zis__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._ function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && __WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(info.pathname, basePath)) { info.pathname = __WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__._(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : __WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : __WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map xOAAAsE;AACf;AACN;AAkD1C,SAASG,oBACdC,QAAgB,EAChBC,OAAgB;QAE0BA;IAA1C,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,CAAAA,sBAAAA,QAAQI,UAAAA,KAAU,OAAlBJ,sBAAsB,CAAC;IACjE,MAAMK,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAAMA,SAASO,QAAQ,CAAC,OAAOH;IAC7D;IAEA,IAAIF,YAAYJ,gGAAaA,CAACQ,KAAKN,QAAQ,EAAEE,WAAW;QACtDI,KAAKN,QAAQ,GAAGH,sGAAgBA,CAACS,KAAKN,QAAQ,EAAEE;QAChDI,KAAKJ,QAAQ,GAAGA;IAClB;IACA,IAAIM,uBAAuBF,KAAKN,QAAQ;IAExC,IACEM,KAAKN,QAAQ,CAACS,UAAU,CAAC,mBACzBH,KAAKN,QAAQ,CAACO,QAAQ,CAAC,UACvB;QACA,MAAMG,QAAQJ,KAAKN,QAAQ,CACxBW,OAAO,CAAC,oBAAoB,IAC5BA,OAAO,CAAC,WAAW,IACnBC,KAAK,CAAC;QAET,MAAMC,UAAUH,KAAK,CAAC,EAAE;QACxBJ,KAAKO,OAAO,GAAGA;QACfL,uBACEE,KAAK,CAAC,EAAE,KAAK,UAAW,MAAGA,MAAMI,KAAK,CAAC,GAAGC,IAAI,CAAC,OAAS;QAE1D,sDAAsD;QACtD,kDAAkD;QAClD,IAAId,QAAQe,SAAS,KAAK,MAAM;YAC9BV,KAAKN,QAAQ,GAAGQ;QAClB;IACF;IAEA,4EAA4E;IAC5E,yBAAyB;IACzB,IAAIL,MAAM;QACR,IAAIc,SAAShB,QAAQiB,YAAY,GAC7BjB,QAAQiB,YAAY,CAACC,OAAO,CAACb,KAAKN,QAAQ,IAC1CJ,4GAAmBA,CAACU,KAAKN,QAAQ,EAAEG,KAAKiB,OAAO;QAEnDd,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACnBL;QAAhBX,KAAKN,QAAQ,GAAGiB,CAAAA,mBAAAA,OAAOjB,QAAAA,KAAQ,OAAfiB,mBAAmBX,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,wBAC7BZ,4GAAmBA,CAACY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACTwebpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts[ import { normalizeLocalePath } from '../../i18n/normalize-locale-path' import { removePathPrefix } from './remove-path-prefix' import { pathHasPrefix } from './path-has-prefix' import type { I18NProvider } from '../../../../server/lib/i18n-provider' export interface NextPathnameInfo { /** * The base path in case the pathname included it. */ basePath?: string /** * The buildId for when the parsed URL is a data URL. Parsing it can be * disabled with the `parseData` option. */ buildId?: string /** * If there was a locale in the pathname, this will hold its value. */ locale?: string /** * The processed pathname without a base path, locale, or data URL elements * when parsing it is enabled. */ pathname: string /** * A boolean telling if the pathname had a trailingSlash. This can be only * true if trailingSlash is enabled. */ trailingSlash?: boolean } interface Options { /** * When passed to true, this function will also parse Nextjs data URLs. */ parseData?: boolean /** * A partial of the Next.js configuration to parse the URL. */ nextConfig?: { basePath?: string i18n?: { locales?: readonly string[] } | null trailingSlash?: boolean } /** * If provided, this normalizer will be used to detect the locale instead of * the default locale detection. */ i18nProvider?: I18NProvider } export function getNextPathnameInfo( pathname: string, options: Options ): NextPathnameInfo { const { basePath, i18n, trailingSlash } = options.nextConfig ?? {} const info: NextPathnameInfo = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash, } if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath) info.basePath = basePath } let pathnameNoDataPrefix = info.pathname if ( info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json') ) { const paths = info.pathname .replace(/^\/_next\/data\//, '') .replace(/\.json$/, '') .split('/') const buildId = paths[0] info.buildId = buildId pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/' // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales) info.locale = result.detectedLocale info.pathname = result.pathname ?? info.pathname if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales) if (result.detectedLocale) { info.locale = result.detectedLocale } } } return info } `qgetNextPathnameInfo-optionsi18nnextConfigpathnameNoDataPrefixCpaths,joinparseDataresulti18nProvideranalyzenimport { normalizeLocalePath } from '../../i18n/normalize-locale-path'; import { removePathPrefix } from './remove-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; export function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map _{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aA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AAGiB,CAAAA,mBAAAA,OAAOjB,QAAAA,AAAQ,KAAA,OAAfiB,mBAAmBX,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,wBAC7BZ,oBAAoBY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0],"file":"x"}false070undefined72127undefined129178undefined180186undefined536548__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined602617__WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__._undefined15261544__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined19071925__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefinedG`ZR(\9 ;// ./node_modules/next/dist/esm/server/web/next-url.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'; import { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'; import { getHostname } from '../../shared/lib/get-hostname'; import { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'; const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); export class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.mapVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware aOQPJ*W __WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined__WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._n const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = __WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !undefined, i18nProvider: this[Internal].options.i18nProvider }); const hostname = __WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__._(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : __WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__._((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return __WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.map oryxTAAAgF;AACiB;AACrC;AAC+B;AAC3F,qGAAqG,EAAE;AACvG;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4GAAmB;AACxC;AACA,wBAAwB,SAA8C;AACtE;AACA,SAAS;AACT,yBAAyB,4FAAW;AACpC,+IAA+I,yGAAkB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kHAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middlewareimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'; import { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'; import { getHostname } from '../../shared/lib/get-hostname'; import { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'; const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); export class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.mapzwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware079undefined81177undefined179238undefined240330undefined683689undefined14441462__WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined15781623undefinedundefined17251735__WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__._undefined19331950__WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__._undefined29853006__WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefinedGU+6 u // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceexport { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies'; //# sourceMappingURL=cookies.js.mapdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware`k]% //# sourceMappingURL=cookies.js.map ^ahx AAA4G;;AAE5Gdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middlewareexport { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies'; //# sourceMappingURL=cookies.js.mapiqwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware0107undefinedG ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { RemovedUAError, RemovedPageError } from '../error'; import { RequestCookies } from './cookies'; export const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ export class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (process.env.NEXT_RUNTIME !== 'edge') { if (init.body && init.duplex !== 'half') { init.duplex = 'half'; } } if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new RequestCookies(this.headers), nextUrl, url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.mapdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middlewaree%'hjZ`P _ 3 @ __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._false{}__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._ false0__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._L const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (false) {} if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(url, { headers: __WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new __WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._(this.headers), nextUrl, url: false ? 0 : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new __WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__._(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new __WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.map MPWxAAAsC;AAC4B;AACN;AACjB;AACpC;AACP;AACA;AACA;AACA;AACA,IAAW;AACX,gCAAgC;AAChC;AACA,QAAQ,2FAAW;AACnB;AACA;AACA;AACA;AACA,YAAY,KAAmC,EAAE,EAIxC;AACT;AACA;AACA,4BAA4B,+EAAO;AACnC,qBAAqB,uHAAyB;AAC9C;AACA,SAAS;AACT;AACA,yBAAyB,6FAAc;AACvC;AACA,iBAAiB,MAA8C,GAAG,CAAG;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gGAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4FAAc;AAChC;AACA;AACA;AACA;AACA;;AAEAdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { RemovedUAError, RemovedPageError } from '../error'; import { RequestCookies } from './cookies'; export const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ export class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (process.env.NEXT_RUNTIME !== 'edge') { if (init.body && init.duplex !== 'half') { init.duplex = 'half'; } } if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new RequestCookies(this.headers), nextUrl, url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.mapXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware037undefined39104undefined106165undefined167209undefined211217undefined520526undefined699709__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined9661000falseundefined10031120{}undefined12391245__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined12751299__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined14211434__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined14891534 falseundefined153815400undefined26402655__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__._undefined28672880__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._undefinedK8$p [ / validateURLNextURLtoNodeOutgoingHttpHeaders_edge_runtime_cookies.RequestCookiesRemovedPageErrorRemovedUAErrorP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js  \webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceEexport class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.mapmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware5>class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map 69@x_AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middlewareEexport class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.mapAxwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware06undefinedH ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js  Awebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource|import { stringifyCookie } from '../../web/spec-extension/cookies'; import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { ReflectAdapter } from './adapters/reflect'; import { ResponseCookies } from './cookies'; const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ export class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.mapewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middlewareeBDikV|(6#1 Zd__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._$ const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>__WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__._(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(init.url, { headers: __WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map %(/x*AAAmE;AAC7B;AAC4B;AACd;AACR;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX,+BAA+B;AAC/B;AACA;AACA,4BAA4B,+FAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,+FAAe;AACrE,yGAAyG,oGAAe;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA,gCAAgC,+EAAO;AACvC,yBAAyB,uHAAyB;AAClD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gCAAgC,2FAAW;AAC3C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,4CAA4C,2FAAW;AACvD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEAewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware|import { stringifyCookie } from '../../web/spec-extension/cookies'; import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { ReflectAdapter } from './adapters/reflect'; import { ResponseCookies } from './cookies'; const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ export class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map08webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware066undefined68105undefined107172undefined174225undefined227270undefined14041410undefined15761590__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined20832097__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined22072221__WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__._undefined25152528__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined26982704__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined27432767__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined41864196__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined44864496__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefinedb Sta- b j  ) *response_INTERNALS_edge_runtime_cookies.ResponseCookies(0,_edge_runtime_cookies.stringifyCookie)ReflectAdapterL ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceS/** * The result of parsing a URL relative to a base URL. */ export function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js|middlewareD{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD,OAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0],"file":"x"}a?EAE/** * The result of parsing a URL relative to a base URL. */ function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map xAAAA;;CAEC,GAaM,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACM,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrBwebpack://../../../../../src/shared/lib/router/utils/relativize-url.tsG/** * The result of parsing a URL relative to a base URL. */ export type RelativeURL = { /** * The relative URL. Either a URL including the origin or a relative URL. */ url: string /** * Whether the URL is relative to the base URL. */ isRelative: boolean } export function parseRelativeURL( url: string | URL, base: string | URL ): RelativeURL { const baseURL = typeof base === 'string' ? new URL(base) : base const relative = new URL(url, base) // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative, } } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url: string | URL, base: string | URL): string { const relative = parseRelativeURL(url, base) return relative.url } ` parseRelativeURLurlbasebaseURLURLrelativeisRelativeorigin5RgetRelativeURLxS/** * The result of parsing a URL relative to a base URL. */ export function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map D{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD,OAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0],"file":"x"}!false6369undefined687693undefinedJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js  !webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map gwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/app-router-headers.js|middleware {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC","ignoreList":[0],"file":"x"}d!']%+lr7= IOconst RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map x)AAAO,MAAMA,aAAa,MAAc;AACjC,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AACxD,MAAMC,gCAAgC,yBAAiC;AACvE,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AACzB,MAAMC,sCACX,+BAAuC;AAClC,MAAMC,0BAA0B,mBAA2B;AAC3D,MAAMC,+BAA+B,4BAAoC;AACzE,MAAMC,WAAW,WAAmB;AACpC,MAAMC,0BAA0B,mBAA2B;AAE3D,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEH,MAAMM,uBAAuB,OAAe;AAE5C,MAAMC,gCAAgC,sBAA8B;AACpE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,6BAA6B,0BAAkC;AACrE,MAAMC,8BAA8B,2BAAmC;AACvE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,+BAA+B,4BAAoCwebpack://../../../src/client/components/app-router-headers.tsexport const RSC_HEADER = 'rsc' as const export const ACTION_HEADER = 'next-action' as const // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch' as const export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const export const NEXT_URL = 'next-url' as const export const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, ] as const export const NEXT_RSC_UNION_QUERY = '_rsc' as const export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const `RSC_HEADERACTION_HEADERNEXT_ROUTER_STATE_TREE_HEADERNEXT_ROUTER_PREFETCH_HEADERNEXT_ROUTER_SEGMENT_PREFETCH_HEADERNEXT_HMR_REFRESH_HEADERNEXT_HMR_REFRESH_HASH_COOKIENEXT_URLRSC_CONTENT_TYPE_HEADERFLIGHT_HEADERSNEXT_RSC_UNION_QUERYNEXT_ROUTER_STALE_TIME_HEADERNEXT_DID_POSTPONE_HEADERNEXT_REWRITTEN_PATH_HEADERNEXT_REWRITTEN_QUERY_HEADERNEXT_IS_PRERENDER_HEADERNEXT_ACTION_NOT_FOUND_HEADERTexport const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map  {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC","ignoreList":[0],"file":"x"} false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefinedA.app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE; ;// ./node_modules/next/dist/esm/server/internal-utils.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceBimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'; const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; export function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } export function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.mapXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middlewareaNsF __WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._ const INTERNAL_QUERY_NAMES = [ __WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._ ]; function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map xnAAA+E;AAC/E;AACA,IAAI,yGAAoB;AACxB;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA,iCAAiC,yGAAoB;AACrD;AACA;;AAEAXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middlewareBimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'; const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; export function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } export function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.maprwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middleware078undefined115134__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined139145undefined267273undefined453472__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined`$B%O ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource2/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map lwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js|middleware={"version":3,"sources":["webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3C","ignoreList":[0],"file":"x"}A+/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map xVAAAA;;;CAGC,GACM,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3Cwebpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path: string) { return path.startsWith('/') ? path : `/${path}` } ensureLeadingSlashYx.2/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ={"version":3,"sources":["webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3C","ignoreList":[0],"file":"x"}false159165undefined8 ;// ./node_modules/next/dist/esm/shared/lib/segment.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } export function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } export function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } export const PAGE_SEGMENT_KEY = '__PAGE__'; export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map Uwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/segment.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":"AAEA,OAAO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEA,OAAO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEA,OAAO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMQ,mBAAmB,WAAU;AAC1C,OAAO,MAAMI,sBAAsB,cAAa","ignoreList":[0],"file":"x"}Gcifunction isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } const PAGE_SEGMENT_KEY = '__PAGE__'; const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map xAAEO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEO,MAAMQ,mBAAmB,WAAU;AACnC,MAAMI,sBAAsB,cAAawebpack://../../../src/shared/lib/segment.ts@import type { Segment } from '../../server/app-render/types' export function isGroupSegment(segment: string) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')') } export function isParallelRouteSegment(segment: string) { return segment.startsWith('@') && segment !== '@children' } export function addSearchParamsIfPageSegment( segment: Segment, searchParams: Record ) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY) if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams) return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY } return segment } export const PAGE_SEGMENT_KEY = '__PAGE__' export const DEFAULT_SEGMENT_KEY = '__DEFAULT__' `isGroupSegmentisParallelRouteSegmentcaddSearchParamsIfPageSegmentsearchParamsisPageSegmentincludesPAGE_SEGMENT_KEYstringifiedQueryJSONstringifyDEFAULT_SEGMENT_KEYexport function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } export function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } export function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } export const PAGE_SEGMENT_KEY = '__PAGE__'; export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":"AAEA,OAAO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEA,OAAO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEA,OAAO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMQ,mBAAmB,WAAU;AAC1C,OAAO,MAAMI,sBAAsB,cAAa","ignoreList":[0],"file":"x"}Lfalse06undefined143149undefined258264undefined611617undefined655661undefinedG ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'; import { isGroupSegment } from '../../segment'; /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map dwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js|middleware {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","normalizeRscURL","url","replace"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,iBAAiBC,KAAa;IAC5C,OAAOH,mBACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,eAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAA,CAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACD,OAAO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0],"file":"x"}bIKyG 1IO__WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._ /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ function normalizeAppPath(route) { return __WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__._(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (__WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map xAAAyE;AAC3B;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACM,SAASE,iBAAiBC,KAAa;IAC5C,OAAOH,0GAAkBA,CACvBG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,kGAAcA,CAACM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,QAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACM,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA;AAGJwebpack://../../../../../src/shared/lib/router/utils/app-paths.tsimport { ensureLeadingSlash } from '../../page-path/ensure-leading-slash' import { isGroupSegment } from '../../segment' /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route: string) { return ensureLeadingSlash( route.split('/').reduce((pathname, segment, index, segments) => { // Empty segments are ignored. if (!segment) { return pathname } // Groups are ignored. if (isGroupSegment(segment)) { return pathname } // Parallel segments are ignored. if (segment[0] === '@') { return pathname } // The last segment (if it's a leaf) should be ignored. if ( (segment === 'page' || segment === 'route') && index === segments.length - 1 ) { return pathname } return `${pathname}/${segment}` }, '') ) } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url: string) { return url.replace( /\.rsc($|\?)/, // $1 ensures `?` is preserved '$1' ) } `normalizeAppPathreduce+normalizeRscURLzimport { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'; import { isGroupSegment } from '../../segment'; /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map  {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","normalizeRscURL","url","replace"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,iBAAiBC,KAAa;IAC5C,OAAOH,mBACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,eAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAA,CAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACD,OAAO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0],"file":"x"}+false073undefined75121undefined747753undefined800817__WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__._undefined10281041__WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._undefined16091615undefinedC =P ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js  (webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceJimport { ReflectAdapter } from './reflect'; /** * @internal */ export class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } export class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.mapmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middlewared *AGSKQFS ' * 7 =Jt__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._u /** * @internal */ class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map vyxAAA2C;AAC3C;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qFAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC,aAAa;AACb;AACA;AACA,2BAA2B,qFAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC,aAAa;AACb;AACA,qDAAqD,qFAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC,aAAa;AACb;AACA,qDAAqD,qFAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middlewareJimport { ReflectAdapter } from './reflect'; /** * @internal */ export class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } export class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map)webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middleware042undefined6571undefined331337undefined955968__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined16061619__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined17941807__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined23302343__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined24942507__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined31143127__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined32643277__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined39013914__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined44684481__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined QTW T 1IsTTTTTTTTTK ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|sharedElr#)dconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ehoxAAAA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|sharedconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.mappwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|shared876882undefined10591065undefined12391245undefinedAuasync_local_storage_createAsyncLocalStorageS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js  Mwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const workAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|sharedd?AGi__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._R const workAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=work-async-storage-instance.js.map SV]x AAAgE;AACzD,iCAAiC,oHAAuB;;AAE/Dwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|sharedimport { createAsyncLocalStorage } from './async-local-storage'; export const workAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map^ webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared063undefined6571undefined105127__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`"@S ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource$// Share the instance module in the next-shared layer import { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { workAsyncStorageInstance as workAsyncStorage }; //# sourceMappingURL=work-async-storage.external.js.map!webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared`6BAp// Share the instance module in the next-shared layer //# sourceMappingURL=work-async-storage.external.js.map BELxAAAA;AAGE;AACsD;;AAExD!webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared$// Share the instance module in the next-shared layer import { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { workAsyncStorageInstance as workAsyncStorage }; //# sourceMappingURL=work-async-storage.external.js.mapM>webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared54177undefined179234undefinedX ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { RequestCookies } from '../cookies'; import { ResponseCookies } from '../cookies'; import { ReflectAdapter } from './reflect'; import { workAsyncStorage } from '../../../app-render/work-async-storage.external'; /** * @internal */ export class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } export class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); export function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } export function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } export class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorage.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } export function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } export function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } export function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.mapuwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middlewaree+-Y[^6<qwY_FL & ~)6__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._0 /** * @internal */ class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = __WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); return wrappedCookies; } } function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); return wrappedCookies; } function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map 14;xAAA4C;AACC;AACF;AACwC;AACnF;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oCAAoC,+FAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yFAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,+FAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qFAAc;AACzC;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEAuwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middlewareimport { RequestCookies } from '../cookies'; import { ResponseCookies } from '../cookies'; import { ReflectAdapter } from './reflect'; import { workAsyncStorage } from '../../../app-render/work-async-storage.external'; /** * @internal */ export class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } export class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); export function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } export function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } export class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorage.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } export function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } export function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } export function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map<webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware043undefined4589undefined91133undefined135217undefined240246undefined566572undefined969982__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined11371143undefined13691375undefined21182124undefined22422256__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined25832598__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined30263040__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined47344747__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined48614867undefined56735686__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined57785784undefined63646370undefinedO^r8m  request_cookies_RequestCookiesAdapter workAsyncStorageInstance   request_cookies_responseCookiesToRequestCookies@ ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js  {webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceY/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user export const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set export const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); export { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, }; //# sourceMappingURL=constants.js.map]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middlewareE\1u/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); //# sourceMappingURL=constants.js.map  'x?AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA,CAAC,eAAe;AAChB;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACsN;;AAEtN]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middlewareY/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user export const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set export const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); export { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, }; //# sourceMappingURL=constants.js.map(webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middleware63946400undefined70877093undefined72607473undefinedCgnconstants_NodeSpan< ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceO/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map Ywebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/is-thenable.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0],"file":"x"}A H/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map  xrAAAA;;;;;CAKC,GACM,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5Bwebpack://../../../src/shared/lib/is-thenable.tsr/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable( promise: Promise | T ): promise is Promise { return ( promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function' ) } isThenablepromisethenyO/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0],"file":"x"}false136142undefined= ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js  m(webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource$import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'; import { isThenable } from '../../../shared/lib/is-thenable'; const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (process.env.NEXT_RUNTIME === 'edge') { api = require('@opentelemetry/api'); } else { try { api = require('@opentelemetry/api'); } catch (err) { api = require('next/dist/compiled/@opentelemetry/api'); } } const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; export class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } export function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); export { getTracer, SpanStatusCode, SpanKind }; //# sourceMappingURL=tracer.js.mapZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middlewarec HJVsyAXFOf$$true__webpack_require__817{}__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._{$ const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (true) { api = __webpack_require__(817); } else {} const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && __WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__._.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); //# sourceMappingURL=tracer.js.map xAAAyE;AACZ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAmC;AACvC,UAAU,mBAAO,CAAC,GAAoB;AACtC,EAAE,KAAK,EAMN;AACD,QAAQ,sEAAsE;AACvE;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,yGAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,yFAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B,QAAQ,oFAAoF;AACxK;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0FAAU;AAClC;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,yGAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC8C;;AAE/CZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware$import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'; import { isThenable } from '../../../shared/lib/is-thenable'; const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (process.env.NEXT_RUNTIME === 'edge') { api = require('@opentelemetry/api'); } else { try { api = require('@opentelemetry/api'); } catch (err) { api = require('next/dist/compiled/@opentelemetry/api'); } } const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; export class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } export function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); export { getTracer, SpanStatusCode, SpanKind }; //# sourceMappingURL=tracer.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware072undefined74134undefined674708trueundefined723729__webpack_require__undefined731750817undefined761908{}undefined9951001undefined11391145undefined36493672__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined48114826__WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__._undefined62146223__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined73247347__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined93189364undefinedI _ *<#$NextVanillaSpanAllowlistLogSpanAllowListtracer_getTracer< ;// ./node_modules/next/dist/esm/server/api-utils/index.js  jwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants'; import { getTracer } from '../lib/trace/tracer'; import { NodeSpan } from '../lib/trace/constants'; export function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ export function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ export function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } export function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } export const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; export const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; export const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; export const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); export const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); export function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = require('next/dist/compiled/cookie'); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ export class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ export function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ export function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middlewarecGI_"OUJP X U [ @ e r v  SYgm__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._(/* unused pure expression or super */ null && ())__webpack_require__663 true0"production"0 function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } function checkIsOnDemandRevalidate(req, previewProps) { const headers = __WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(req.headers); const previewModeId = headers.get(__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__._); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; const RESPONSE_LIMIT_DEFAULT = (/* unused pure expression or super */ null && (4 * 1024 * 1024)); const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = __webpack_require__(663); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map x)AAAwE;AACsC;AAC9D;AACE;AAC3C;AACP;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP,oBAAoB,qFAAc;AAClC,sCAAsC,sHAA2B;AACjE;AACA,gDAAgD,oJAA0C;AAC1F;AACA;AACA;AACA;AACA;AACO;AACA;AACA,+BAA+B,+DAAe;AAC9C;AACA;AACA,2CAA2C;AAClD;AACA;AACA;AACA,YAAY,YAAY,EAAE,mBAAO,CAAC,GAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW,uBAAuB,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEAYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middlewareimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants'; import { getTracer } from '../lib/trace/tracer'; import { NodeSpan } from '../lib/trace/constants'; export function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ export function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ export function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } export function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } export const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; export const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; export const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; export const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); export const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); export function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = require('next/dist/compiled/cookie'); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ export class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ export function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ export function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middleware071undefined73182undefined184231undefined233282undefined284290undefined703709undefined930936undefined16151621undefined16981711__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined17701796__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__._undefined19271968__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._undefined20562062undefined21222128undefined21872193undefined22252224(/* unused pure expression or super */ null && (undefined22402239))undefined22422248undefined23132319undefined23892395undefined25362542__webpack_require__undefined25442570663undefined31363173 trueundefined318631900undefined32133232"production"undefined37533790 trueundefined380338070undefined38303849"production"undefined41794185undefined44554461undefined47754781undefinedEnrHeadersAdapterPRERENDER_REVALIDATE_HEADERPRERENDER_REVALIDATE_ONLY_GENERATED_HEADERN ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js  d webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils'; export class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id')); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.mapkwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middlewaredVX^W,\uId __WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._ false0 true0"production"03 class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && __WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__._(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. false && 0)); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: __WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._, value: this._previewModeId, httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: __WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._, value: '', httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.map xAAAuF;AAChF;AACP;AACA;AACA;AACA;AACA,qDAAqD,wHAAyB;AAC9E,wDAAwD,yHAA4B;AACpF;AACA,QAAQ,MAAqC,IAAI,CAA+C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB,yHAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yHAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEAkwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils'; export class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id')); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.mapVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware086undefined8894undefined406430__WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__._undefined529556__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined860896 falseundefined9019470undefined15331560__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined16531690 trueundefined170317070undefined17301749"production"undefined21212148__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined22242261 trueundefined227422780undefined23012320"production"undefinedG8 checkIsOnDemandRevalidateCOOKIE_NAME_PRERENDER_BYPASSH ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js  2webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'; import { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies'; import { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'; import { DraftModeProvider } from './draft-mode-provider'; import { splitCookiesString } from '../web/utils'; function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } export function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } export function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } export function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.mapewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middlewarecKM_PRDQ{,9;HeSa+1WdfHsj~,NP`__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._ function getHeaders(headers) { const cleaned = __WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(headers); for (const header of __WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._){ cleaned.delete(header); } return __WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new __WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(headers)); return __WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of __WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__._(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new __WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = __WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = __WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__._(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new __WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.map x*AAA4E;AACJ;AACmH;AAC3G;AACtB;AACR;AAClD;AACA,oBAAoB,qFAAc;AAClC,yBAAyB,6FAAc;AACvC;AACA;AACA,WAAW,qFAAc;AACzB;AACA;AACA,wBAAwB,6FAAc,CAAC,qFAAc;AACrD,WAAW,iHAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yGAAkB;AAC/C;AACA;AACA,oCAAoC,+FAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,6FAAc,CAAC,qFAAc;AACxE;AACA;AACA;AACA,gCAAgC,mGAAqB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gDAAgD,4IAAmC;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,mGAAiB;AACvD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEAewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middlewareimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'; import { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies'; import { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'; import { DraftModeProvider } from './draft-mode-provider'; import { splitCookiesString } from '../web/utils'; function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } export function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } export function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } export function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middleware075undefined77148undefined150336undefined338417undefined419476undefined478527undefined580593__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined635648__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined701714__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined812825__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined827840__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined869896__WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined14781495__WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__._undefined16191633__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined18351841undefined22822288undefined39273940__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined39423955__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined42024222__WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined49084942__WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__._undefined52005216__WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._undefined55545560undefineda 9XHZ\=g  _VfUpMutableRequestCookiesAdaptersplitCookiesStringncreateCookiesWithMutableAccessCheckDraftModeProviderX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js  _webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const workUnitAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|sharedc?AGm@__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._ const workUnitAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=work-unit-async-storage-instance.js.map x AAAgE;AACzD,qCAAqC,oHAAuB;;AAEnEwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|sharedimport { createAsyncLocalStorage } from './async-local-storage'; export const workUnitAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|shared063undefined6571undefined109131__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`&@@J ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[8].use[0]!./node_modules/next/dist/esm/client/components/app-router-headers.js|shared {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT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;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEH,MAAMM,uBAAuB,OAAe;AAE5C,MAAMC,gCAAgC,sBAA8B;AACpE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,6BAA6B,0BAAkC;AACrE,MAAMC,8BAA8B,2BAAmC;AACvE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,+BAA+B,4BAAoC`d ,_9]w.U\r '.P[nG 2Lrapp_router_headers_RSC_HEADERapp_router_headers_ACTION_HEADERapp_router_headers_NEXT_ROUTER_STATE_TREE_HEADERapp_router_headers_NEXT_ROUTER_PREFETCH_HEADERapp_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERapp_router_headers_NEXT_HMR_REFRESH_HEADERcomponents_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEapp_router_headers_NEXT_URLapp_router_headers_RSC_CONTENT_TYPE_HEADERapp_router_headers_FLIGHT_HEADERSapp_router_headers_NEXT_RSC_UNION_QUERYapp_router_headers_NEXT_ROUTER_STALE_TIME_HEADERapp_router_headers_NEXT_DID_POSTPONE_HEADERapp_router_headers_NEXT_REWRITTEN_PATH_HEADERapp_router_headers_NEXT_REWRITTEN_QUERY_HEADERapp_router_headers_NEXT_IS_PRERENDER_HEADERapp_router_headers_NEXT_ACTION_NOT_FOUND_HEADER@ ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js  Mwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[8].use[0]!./node_modules/next/dist/esm/shared/lib/invariant-error.js|shared{"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}uclass InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map vyxAAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,IAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACFwebpack://../../../src/shared/lib/invariant-error.ts export class InvariantError extends Error { constructor(message: string, options?: ErrorOptions) { super( `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`, options ) this.name = 'InvariantError' } } InvariantErrorErrorconstructormessagename#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}`invariant_error_InvariantErrorX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js  nwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource// Share the instance module in the next-shared layer import { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; import { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'; import { InvariantError } from '../../shared/lib/invariant-error'; export { workUnitAsyncStorageInstance as workUnitAsyncStorage }; export function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } export function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } export function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } export function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } export function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } export function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } export function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map&webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shareda6ZXZ  ]p// Share the instance module in the next-shared layer function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map ^ahxAAAA;AAGE;AACwF;AACxB;AACF;AACzD;AACP,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA&webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared// Share the instance module in the next-shared layer import { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; import { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'; import { InvariantError } from '../../shared/lib/invariant-error'; export { workUnitAsyncStorageInstance as workUnitAsyncStorage }; export function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } export function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } export function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } export function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } export function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } export function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } export function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.mapiwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared54186undefined188277undefined279344undefined346409undefined411417undefined768774undefined10301036undefined17091715undefined27202726undefined35213527undefined41094115undefined47914797undefined54005406undefined58735879undefinedaC]AZowork_unit_async_storage_external_throwForMissingRequestStorework_unit_async_storage_external_getRuntimeStagePromise // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/invariant-error.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}J LOVxb`lib_invariant_error_InvariantError: ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ export class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.mapWwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middlewareA=/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.map >AHxAAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAWwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ export class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.mapIhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware12541260undefinedY ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map(); export const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map vwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js|middleware{"version":3,"sources":["webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;AACrB,OAAO,MAAMA,eAAe,IAAIC,MAAqB;AAErD,OAAO,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0],"file":"x"}aflA,// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. const tagsManifest = new Map(); const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map -07xAAEA,+EAA+E;AAC/E,qBAAqB;AACd,MAAMA,eAAe,IAAIC,MAAqB;AAE9C,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAACwebpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.tsimport type { Timestamp } from '../cache-handlers/types' // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map() export const isStale = (tags: string[], timestamp: Timestamp) => { for (const tag of tags) { const revalidatedAt = tagsManifest.get(tag) if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true } } return false } tagsManifestMapisStaletagstimestamptagrevalidatedAtk// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map(); export const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;AACrB,OAAO,MAAMA,eAAe,IAAIC,MAAqB;AAErD,OAAO,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0],"file":"x"}#false102108undefined141147undefinedP ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js  i4webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceK/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache'; import { isStale, tagsManifest } from '../incremental-cache/tags-manifest.external'; // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; export default DefaultCacheHandler; //# sourceMappingURL=default.external.js.map mwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js|middleware{"version":3,"sources":["webpack://../../../../src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,SACtB,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BE;AAEJ,MAAMC,sBAAsC;IAC1C,MAAMC,KAAIC,QAAQ;QAChB,MAAMC,iBAAiBZ,YAAYU,GAAG,CAACC;QAEvC,IAAIC,gBAAgB;YAClBV,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,MAAMC;QACR;QAEA,MAAMC,eAAehB,YAAYa,GAAG,CAACC;QAErC,IAAI,CAACE,cAAc;YACjBX,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,OAAOH;QACT;QAEA,MAAMV,QAAQe,aAAaf,KAAK;QAChC,IACEgB,YAAYC,UAAU,GAAGD,YAAYE,GAAG,KACxClB,MAAMmB,SAAS,GAAGnB,MAAMoB,UAAU,GAAG,MACrC;YACA,qEAAqE;YACrE,yEAAyE;YACzE,kBAAkB;YAClBhB,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YAEzB,OAAOH;QACT;QAEA,IAAIb,QAAQG,MAAMqB,IAAI,EAAErB,MAAMmB,SAAS,GAAG;YACxCf,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YAEzB,OAAOH;QACT;QACA,MAAM,CAACY,cAAcC,SAAS,GAAGvB,MAAMwB,KAAK,CAACC,GAAG;QAChDzB,MAAMwB,KAAK,GA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QACzB,MAAM0B,aAAaC,KAAKC,GAAG,IACtB5B,KAAK6B,GAAG,CAAC,CAACC,MAAQrD,aAAac,GAAG,CAACuC,QAAQ;QAGhD/C,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,aAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,eAAeR,oBAAmB","ignoreList":[0],"file":"x"}` V< zcn @__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._Buffer__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && ()));=/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; /** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ // LRU cache default to max 50 MB but in future track const memoryCache = new __WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (__WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? __WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._.set(tag, timestamp); } } }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (DefaultCacheHandler))); //# sourceMappingURL=default.external.js.map x ;AAAA;;;;;;;CAOC,GAEsC;AAKa;AAsBpD,qDAAqD;AACrD,MAAMG,cAAc,IAAIH,iFAAQA,CAC9B,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BE;AAEJ,MAAMC,sBAAsC;IAC1C,MAAMC,KAAIC,QAAQ;QAChB,MAAMC,iBAAiBZ,YAAYU,GAAG,CAACC;QAEvC,IAAIC,gBAAgB;YAClBV,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,MAAMC;QACR;QAEA,MAAMC,eAAehB,YAAYa,GAAG,CAACC;QAErC,IAAI,CAACE,cAAc;YACjBX,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,OAAOH;QACT;QAEA,MAAMV,QAAQe,aAAaf,KAAK;QAChC,IACEgB,YAAYC,UAAU,GAAGD,YAAYE,GAAG,KACxClB,MAAMmB,SAAS,GAAGnB,MAAMoB,UAAU,GAAG,MACrC;YACA,qEAAqE;YACrE,yEAAyE;YACzE,kBAAkB;YAClBhB,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YAEzB,OAAOH;QACT;QAEA,IAAIb,oFAAOA,CAACG,MAAMqB,IAAI,EAAErB,MAAMmB,SAAS,GAAG;YACxCf,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS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;YACRd;YACA3B,YAAY0C,MAAM,CAAC/B;QACrB;IACF;IAEA,MAAMgC;IACJ,gDAAgD;IAClD;IAEA,MAAMC,eAAc,GAAGzB,IAAI;QACzB,MAAM0B,aAAaC,KAAKC,GAAG,IACtB5B,KAAK6B,GAAG,CAAC,CAACC,MAAQrD,iFAAYA,CAACc,GAAG,CAACuC,QAAQ;QAGhD/C,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,iFAAYA,CAAC6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,iEAAeR,gDAAAA,mBAAmBA,EAAAA,EAAAwebpack://../../../../src/server/lib/cache-handlers/default.external.ts*/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache' import type { CacheEntry, CacheHandlerV2 } from './types' import { isStale, tagsManifest, } from '../incremental-cache/tags-manifest.external' type PrivateCacheEntry = { entry: CacheEntry // For the default cache we store errored cache // entries and allow them to be used up to 3 times // after that we want to dispose it and try for fresh // If an entry is errored we return no entry // three times so that we retry hitting origin (MISS) // and then if it still fails to set after the third we // return the errored content and use expiration of // Math.min(30, entry.expiration) isErrored: boolean errorRetryCount: number // compute size on set since we need to read size // of the ReadableStream for LRU evicting size: number } // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache( 50 * 1024 * 1024, (entry) => entry.size ) const pendingSets = new Map>() const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined const DefaultCacheHandler: CacheHandlerV2 = { async get(cacheKey) { const pendingPromise = pendingSets.get(cacheKey) if (pendingPromise) { debug?.('get', cacheKey, 'pending') await pendingPromise } const privateEntry = memoryCache.get(cacheKey) if (!privateEntry) { debug?.('get', cacheKey, 'not found') return undefined } const entry = privateEntry.entry if ( performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000 ) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug?.('get', cacheKey, 'expired') return undefined } if (isStale(entry.tags, entry.timestamp)) { debug?.('get', cacheKey, 'had stale tag') return undefined } const [returnStream, newSaved] = entry.value.tee() entry.value = newSaved debug?.('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire, }) return { ...entry, value: returnStream, } }, async set(cacheKey, pendingEntry) { debug?.('set', cacheKey, 'start') let resolvePending: () => void = () => {} const pendingPromise = new Promise((resolve) => { resolvePending = resolve }) pendingSets.set(cacheKey, pendingPromise) const entry = await pendingEntry let size = 0 try { const [value, clonedValue] = entry.value.tee() entry.value = value const reader = clonedValue.getReader() for (let chunk; !(chunk = await reader.read()).done; ) { size += Buffer.from(chunk.value).byteLength } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size, }) debug?.('set', cacheKey, 'done') } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug?.('set', cacheKey, 'failed', err) } finally { resolvePending() pendingSets.delete(cacheKey) } }, async refreshTags() { // Nothing to do for an in-memory cache handler. }, async getExpiration(...tags) { const expiration = Math.max( ...tags.map((tag) => tagsManifest.get(tag) ?? 0) ) debug?.('getExpiration', { tags, expiration }) return expiration }, async expireTags(...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()) debug?.('expireTags', { tags, timestamp }) for (const tag of tags) { // TODO: update file-system-cache? tagsManifest.set(tag, timestamp) } }, } export default DefaultCacheHandler `:LRUCachememoryCacheentrypendingSetsdebugprocessenvNEXT_PRIVATE_DEBUG_CACHEconsolebindDefaultCacheHandlerMcacheKeypendingPromiseprivateEntryperformancetimeOriginnowيrevalidate׌returnStreamnewSavedvalueteeexpireBpendingEntryresolvePendingPromiseresolveclonedValuereadergetReaderchunkreaddoneBufferfrombyteLengthisErrorederrorRetryCounterrdeleterefreshTagsgetExpirationexpirationMathmaxexpireTagsroundConcatSourceRawSourceK/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; S/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache'; import { isStale, tagsManifest } from '../incremental-cache/tags-manifest.external'; // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; export default DefaultCacheHandler; //# sourceMappingURL=default.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,SACtB,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAw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c;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,aAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,eAAeR,oBAAmB","ignoreList":[0],"file":"x"}false448487undefined489572undefined652659__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined17771783__WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._undefined29542959Bufferundefined37063717__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined41954206__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined42484262/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined42484262undefined42634262(/* unused pure expression or super */ null && (undefined42824281))undefined42824282.5);undefinedM[p \/ ] default_external_DefaultCacheHandlerdefault_external? ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport DefaultCacheHandler from '../lib/cache-handlers/default.external'; const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ export function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ export function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ export function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ export function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ export function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware`HI#% + X ^   const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map xXAAAyE;AACzE;AACA,8BAA8B,QAAQ;AACtC,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middlewareimport DefaultCacheHandler from '../lib/cache-handlers/default.external'; const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ export function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ export function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ export function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ export function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ export function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware072undefined797803undefined28532859undefined34163422undefined38063812undefined41174123undefinedb _x|!/3HLCCG\`handlers_debug? ;// ./node_modules/next/dist/esm/server/revalidation-utils.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourcee import { getCacheHandlers } from './use-cache/handlers'; /** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } export async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware`7E__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._u /** Run a callback, and execute any *new* revalidations added during its runtime. */ async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = __WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map xhAAAwD;AACxD,qFAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sGAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middlewaree import { getCacheHandlers } from './use-cache/handlers'; /** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } export async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware055undefined142148undefined20362051__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._undefined22242230undefinedAgetCacheHandlersD  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.maphwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middlewareElr#)E xFhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middlewareGBwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middleware876882undefined10591065undefined12391245undefinedb-_8_/Sz %u%0@[oA7async_local_storage_sharedAsyncLocalStorageNotAvailableErrorasync_local_storage_FakeAsyncLocalStorageasync_local_storage_maybeGlobalAsyncLocalStorageapp_render_async_local_storage_createAsyncLocalStorageasync_local_storage_bindSnapshotasync_local_storage_createSnapshotY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js  hwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const afterTaskAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.mapvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middlewarec?AGn@__WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._ const afterTaskAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=after-task-async-storage-instance.js.map x AAAgE;AACzD,sCAAsC,oHAAuB;;AAEpEvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middlewareimport { createAsyncLocalStorage } from './async-local-storage'; export const afterTaskAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middleware063undefined6571undefined110132__WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`'@Y ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js  fwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource7// Share the instance module in the next-shared layer import { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { afterTaskAsyncStorage }; //# sourceMappingURL=after-task-async-storage.external.js.mapvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware`6Bv// Share the instance module in the next-shared layer //# sourceMappingURL=after-task-async-storage.external.js.map xAAAA;AAGE;AAC+B;;AAEjCvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware7// Share the instance module in the next-shared layer import { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { afterTaskAsyncStorage }; //# sourceMappingURL=after-task-async-storage.external.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware54213undefined215247undefined@ ;// ./node_modules/next/dist/esm/server/after/after-context.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport PromiseQueue from 'next/dist/compiled/p-queue'; import { InvariantError } from '../../shared/lib/invariant-error'; import { isThenable } from '../../shared/lib/is-thenable'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { withExecuteRevalidates } from '../revalidation-utils'; import { bindSnapshot } from '../app-render/async-local-storage'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new PromiseQueue(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorage.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorage.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = bindSnapshot(async ()=>{ try { await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middlewaree57xz_AC35;=H~ ! W k )6%o@|__WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._s class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new __WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__._(); this.callbackQueue.pause(); } after(task) { if (__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = __WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = __WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = __WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__._(async ()=>{ try { await __WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = __WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._.getStore(); if (!workStore) { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return __WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map tw~xGAAAsD;AACY;AACR;AACmB;AACd;AACE;AACqB;AACE;AACjF;AACP,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA,iCAAiC,+EAAY;AAC7C;AACA;AACA;AACA,YAAY,0FAAU;AACtB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iGAAoB;AAClD;AACA;AACA;AACA,+BAA+B,mGAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,8FAAY;AAC5C;AACA,sBAAsB,mGAAqB;AAC3C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yFAAgB;AAC1C;AACA,4CAA4C,6FAAc;AAC1D;AACA;AACA;AACA,aAAa;AACb;AACA,eAAe,kHAAsB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,wDAAwD,6FAAc;AACtE;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middlewareimport PromiseQueue from 'next/dist/compiled/p-queue'; import { InvariantError } from '../../shared/lib/invariant-error'; import { isThenable } from '../../shared/lib/is-thenable'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { withExecuteRevalidates } from '../revalidation-utils'; import { bindSnapshot } from '../app-render/async-local-storage'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new PromiseQueue(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorage.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorage.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = bindSnapshot(async ()=>{ try { await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map9webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middleware053undefined55120undefined122179undefined181257undefined259321undefined323387undefined389474undefined476563undefined565571undefined829840__WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__._undefined917926__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined17631782__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined19181938__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined30943105__WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__._undefined31593179__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined37823797__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined38813894__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined41124133__WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._undefined49754988__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined S WB* m  ` hBY(p_queue_default())`workUnitAsyncStorageInstanceafterTaskAsyncStorageInstanceA!withExecuteRevalidates < ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ export function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } export function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middlewareC'-^/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.map _bixAAAA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEAYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ export function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } export function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.mapjwwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware181187undefined807813undefinedE ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { AfterContext } from '../after/after-context'; import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { createLazyResult } from '../lib/lazy-result'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createSnapshot } from '../app-render/async-local-storage'; export function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.mapbwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middlewarec 57R<>D$ %:__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._M function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: __WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__._(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: __WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__._(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new __WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__._({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = __WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, __WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map NQXx AAAsD;AACqB;AACrB;AACS;AACI;AAC5D,2BAA2B,yEAAyE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kGAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD,eAAe,yFAAY;AAC3B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kHAAsB;AAChD;AACA;AACA;AACA,iDAAiD,sGAAgB;AACjE;AACA;AACA;AACA;AACA;;AAEAbwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middlewareimport { AfterContext } from '../after/after-context'; import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { createLazyResult } from '../lib/lazy-result'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createSnapshot } from '../app-render/async-local-storage'; export function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middleware053undefined55129undefined131184undefined186248undefined250316undefined318324undefined18131828__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__._undefined29532966__WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__._undefined32733284__WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__._undefined36213642__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined38293844__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefinedI: 3 MmAfterContextgetCacheHandlerEntriescreateLazyResult= ;// ./node_modules/next/dist/esm/server/web/web-on-close.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ export function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } export function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } export class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.mapZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middlewareEhn9/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.map :=DxRAAAA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yDAAyD,UAAU,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ export function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } export function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } export class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.mapEwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware136142undefined616622undefined11741180undefinedG ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js  [webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceF/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ export function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.mapdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middlewareA(?/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map ),3xAAAAA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEAdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middlewareF/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ export function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map4swebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middleware235241undefinedJ ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js  swebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceRimport { createAsyncLocalStorage } from '../app-render/async-local-storage'; export function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ export function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.mapgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middlewarebKMSAIO function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map "xaAAA4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEAgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middlewareRimport { createAsyncLocalStorage } from '../app-render/async-local-storage'; export function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ export function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware075undefined7783undefined585591undefined> ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js  ) webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middlewarea@BLSY__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._@ const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = __WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, __WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map  xAAAiE;AACF;AACd;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,sCAAsC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kHAAsB;AAChD;AACA;AACA;AACA,iDAAiD,sGAAgB;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,oHAA0B,CAAC,EAAE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,oHAA0B,CAAC,EAAE,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware064undefined66128undefined130178undefined12761297__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined14861501__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined16191625undefined19401965__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined22262251__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefinedGKy y NEXT_CACHE_IMPLICIT_TAG_ID? ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js  #webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ export function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middlewareA/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map x0AAAA;AACA;AACA,kCAAkC;AAClC,IAAW;AACX;AACA;;AAEA\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ export function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.mapkwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware163169undefined8 ;// ./node_modules/next/dist/esm/server/web/adapter.js  5Wwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource Fimport { PageSignatureError } from './error'; import { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'; import { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event'; import { NextRequest } from './spec-extension/request'; import { NextResponse } from './spec-extension/response'; import { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url'; import { NextURL } from './next-url'; import { stripInternalSearchParams } from '../internal-utils'; import { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'; import { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers'; import { ensureInstrumentationRegistered } from './globals'; import { createRequestStoreForAPI } from '../async-storage/request-store'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { createWorkStore } from '../async-storage/work-store'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'; import { getTracer } from '../lib/trace/tracer'; import { MiddlewareSpan } from '../lib/trace/constants'; import { CloseController } from './web-on-close'; import { getEdgePreviewProps } from './get-edge-preview-props'; import { getBuiltinRequestContext } from '../after/builtin-request-context'; import { getImplicitTags } from '../lib/implicit-tags'; import { isRSCRequestHeader } from '../lib/is-rsc-request'; export class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm require('next/dist/experimental/testmode/server-edge'); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } export async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: process.env.NODE_ENV !== 'development', fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX, dev: process.env.NODE_ENV === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\/\//))) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middlewareeJ,.|~_KM\^AC"$pr46_fh+-gioHYIZH Y S Y _$>3u4.dp}!_!!!!!h$z$,%:%%%&'&**p++++1172e2h4w4555577:8NT8<+<Y<l<L>R>??)B6BBBxEE__WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__.___webpack_require__720__WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._ false0__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._"production"""__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__.___WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._ true__WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._0__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._true__WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._J class NextRequestHint extends __WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__._ { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = __WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm __webpack_require__(720); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await __WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__._(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = __WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__._(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = __WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__._(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = __WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = __WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__._(requestHeaders.get(__WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__._)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of __WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = false ? 0 : requestURL; const rscHash = normalizeURL.searchParams.get(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: __WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: "production" !== 'development', fetchCacheKeyPrefix: "", dev: "production" === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: __WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = __WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__._()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new __WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__._({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new __WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__._(); return __WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._().trace(__WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__._.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = __WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await __WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__._(page, request.nextUrl, fallbackRouteParams); const requestStore = __WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__._(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = __WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__._({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__._) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await __WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._.run(workStore, ()=>__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if ( true && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = __WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !( false && 0)) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__._, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._)) { rewriteURL.searchParams.set(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (true) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', __WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__._(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : __WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: __WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map x AAA6C;AACkC;AACa;AACrC;AACE;AACuC;AAC3D;AACyB;AACY;AAC6F;AAC3G;AACc;AACY;AACxB;AACe;AACY;AACzC;AACQ;AACP;AACc;AACa;AACrB;AACI;AACpD,8BAA8B,uFAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wFAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D,YAAY,mBAAO,CAAC,GAA6C;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,UAAU,mIAA+B;AACzC;AACA;AACA,yBAAyB,oGAAe;AACxC,gFAAgF,+EAAO;AACvF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mHAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2HAA2B;AACtD;AACA,yBAAyB,0GAAkB,oBAAoB,qFAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6FAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAA8C,GAAG,CAA2B;AACrG,kDAAkD,yGAAoB;AACtE;AACA;AACA;AACA,eAAe,wHAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAoB;AAC7C,iCAAiC,EAAyC;AAC1E,iBAAiB,YAAoB;AACrC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,qCAAqC;AACrC;AACA,6BAA6B,4GAAmB;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qFAAqF,sHAAwB;AAC7G,sBAAsB,4FAAc;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+FAAe;AACvD,mBAAmB,wFAAS,SAAS,gFAAc;AACnD,wCAAwC,gBAAgB,EAAE,yBAAyB;AACnF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,yCAAyC,4GAAmB;AAC5D;AACA;AACA;AACA,+CAA+C,oGAAe;AAC9D,yCAAyC,sHAAwB;AACjE,sCAAsC,oGAAe;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,yBAAyB;AACzB,+DAA+D,uHAA2B;AAC1F;AACA;AACA,qBAAqB;AACrB,iCAAiC,yFAAgB,oBAAoB,iGAAoB;AACzF,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+EAAO;AACvC;AACA;AACA;AACA,SAAS;AACT,YAAY,KAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC,EAAE,sGAAgB;AACzE;AACA;AACA;AACA,UAAU,MAAsD,IAAI,CAA0C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qHAA0B;AAC/D;AACA;AACA,qCAAqC,uHAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,yGAAoB;AAC7D,wCAAwC,yGAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+EAAO;AACvC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,YAAY,IAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,kGAAc;AACpE;AACA;AACA,gDAAgD,iFAAY;AAC5D;AACA;AACA;AACA;AACA;AACA,8DAA8D,IAAI;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6HAA4B;AAC/C;AACA;AACA;;AAEAUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware Fimport { PageSignatureError } from './error'; import { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'; import { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event'; import { NextRequest } from './spec-extension/request'; import { NextResponse } from './spec-extension/response'; import { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url'; import { NextURL } from './next-url'; import { stripInternalSearchParams } from '../internal-utils'; import { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'; import { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers'; import { ensureInstrumentationRegistered } from './globals'; import { createRequestStoreForAPI } from '../async-storage/request-store'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { createWorkStore } from '../async-storage/work-store'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'; import { getTracer } from '../lib/trace/tracer'; import { MiddlewareSpan } from '../lib/trace/constants'; import { CloseController } from './web-on-close'; import { getEdgePreviewProps } from './get-edge-preview-props'; import { getBuiltinRequestContext } from '../after/builtin-request-context'; import { getImplicitTags } from '../lib/implicit-tags'; import { isRSCRequestHeader } from '../lib/is-rsc-request'; export class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm require('next/dist/experimental/testmode/server-edge'); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } export async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: process.env.NODE_ENV !== 'development', fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX, dev: process.env.NODE_ENV === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\/\//))) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware044undefined46124undefined126217undefined219273undefined275331undefined333428undefined430466undefined468529undefined531604undefined606772undefined774833undefined835908undefined910995undefined9971058undefined10601136undefined11381226undefined12281275undefined12771332undefined13341382undefined13841446undefined14481523undefined15251579undefined15811639undefined16411647undefined16781688__WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__._undefined18641881__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined21212138__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined23762393__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined27592767__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined32473253__webpack_require__undefined32553299720undefined34113417undefined35293559__WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__._undefined37153729__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__._undefined38323838__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined43344356__WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__._undefined49004926__WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined50455062__WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__._undefined50835092__WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__._undefined53515364__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined56085653 falseundefined565756830undefined57495768__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined59165940__WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._undefined69396958"production"undefined70127052""undefined70727091"production"undefined74027420__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined76857708__WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__._undefined77927805__WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__._undefined86048618__WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__._undefined86428650__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined86608673__WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__._undefined93209338__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined95169530__WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__._undefined96189641__WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__._undefined97539767__WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__._undefined1092310949__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__._undefined1112011135__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined1115611175__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined1268612692__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1285512901 trueundefined1341613431__WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._undefined1370613759 falseundefined13764138050undefined1423214257__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__._undefined1439414420__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._undefined1538415403__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1544915468__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1594815954__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1631716363trueundefined1693716950__WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__._undefined1706517076__WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined1778417811__WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._undefineda&5_;B^ ]   t WZ]hR[_$ !k!u!!K$$h%%#&&'k'+e,-h-}--346!79]::\; ?J??@ALBEYFFGI\JNextRequest444ensureInstrumentationRegisteredOnormalizeNextQueryParamfromNodeOutgoingHttpHeadersisRSCRequestHeaderstripInternalSearchParamsgetEdgePreviewPropsgetBuiltinRequestContextNextFetchEventCloseControllerMiddlewareSpangetImplicitTagscreateRequestStoreForAPIcreateWorkStorebNextResponsegetWaitUntilPromiseFromEvent // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js  7webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import parseua from 'next/dist/compiled/ua-parser-js'; export function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } export function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } export function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.mapgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middlewareb57=Crx function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.map xUAAAsD;AAC/C;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO,qBAAqB,SAAS;AACrC;AACA;;AAEAgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware import parseua from 'next/dist/compiled/ua-parser-js'; export function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } export function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } export function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware053undefined5561undefined474480undefined626632undefinedK ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; export { GlobalURLPattern as URLPattern }; //# sourceMappingURL=url-pattern.js.maphwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middlewareAconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; //# sourceMappingURL=url-pattern.js.map xAAAA;AACA;AAC0C;;AAE1Chwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middlewareconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; export { GlobalURLPattern as URLPattern }; //# sourceMappingURL=url-pattern.js.mapwwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middleware145186undefined8 ;// ./node_modules/next/dist/esm/server/after/after.js  4webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource)import { workAsyncStorage } from '../app-render/work-async-storage.external'; /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ export function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware`LA /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map xlAAA6E;AAC7E;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY,eAAe;AAC3B;AACA;;AAEAUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware)import { workAsyncStorage } from '../app-render/work-async-storage.external'; /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ export function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.mappwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware076undefined187193undefined8 ;// ./node_modules/next/dist/esm/server/after/index.js  ;webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource;export * from './after'; //# sourceMappingURL=index.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware`# //# sourceMappingURL=index.js.map x AAAwB;;AAExBUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware;export * from './after'; //# sourceMappingURL=index.js.map;export * from './after'; //# sourceMappingURL=index.js.mapawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware023undefined // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; export class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } export function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/hooks-server-context.js|middleware{"version":3,"sources":["webpack://../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}a39A|const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map }xFAAAA,MAAMA,qBAAqB;AAEpB,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,aAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxBwebpack://../../../src/client/components/hooks-server-context.tsconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE' export class DynamicServerError extends Error { digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE constructor(public readonly description: string) { super(`Dynamic server usage: ${description}`) } } export function isDynamicServerError(err: unknown): err is DynamicServerError { if ( typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string' ) { return false } return err.digest === DYNAMIC_ERROR_CODE } DYNAMIC_ERROR_CODEDynamicServerErrordescriptiondigestisDynamicServerErrorconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; export class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } export function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map {"version":3,"sources":["webpack://../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}!false5157undefined258264undefineda9Jhooks_server_context_DynamicServerErrorQ ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; export class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } export function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map nwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/static-generation-bailout.js|middleware{"version":3,"sources":["webpack://../../../src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":"AAAA,MAAMA,0BAA0B;AAEhC,OAAO,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEA,OAAO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0],"file":"x"}a;AAcconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map dgnxAAAA,MAAMA,0BAA0B;AAEzB,MAAMC,8BAA8BC;;QAApC,qBACWC,IAAAA,GAAOH;;AACzB;AAEO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,WAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxBwebpack://../../../src/client/components/static-generation-bailout.tsconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT' export class StaticGenBailoutError extends Error { public readonly code = NEXT_STATIC_GEN_BAILOUT } export function isStaticGenBailoutError( error: unknown ): error is StaticGenBailoutError { if (typeof error !== 'object' || error === null || !('code' in error)) { return false } return error.code === NEXT_STATIC_GEN_BAILOUT } NEXT_STATIC_GEN_BAILOUTStaticGenBailoutErrorcodeisStaticGenBailoutErrorerrorconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; export class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } export function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map {"version":3,"sources":["webpack://../../../src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":"AAAA,MAAMA,0BAA0B;AAEhC,OAAO,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEA,OAAO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0],"file":"x"}!false5965undefined205211undefinedaAUstatic_generation_bailout_StaticGenBailoutErrorD ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource export function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ export function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} export function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.mapawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middlewareCNT J function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map KNUxAAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,YAAY,sGAAsG,YAAY,+KAA+K,MAAM;AACzV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEAawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware export function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ export function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} export function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.mapVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware06undefined11021108undefined25102516undefinedAPadynamic_rendering_utils_makeHangingPromiseF ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js  hwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceAexport const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; export const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; export const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; export const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.mapcwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middlewareaDJC8%const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map 9<CxAAAO;AACA;AACA;AACA;;AAEPcwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middlewareAexport const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; export const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; export const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; export const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.mapDwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middleware06undefined6874undefined136142undefined200206undefinedL ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js|middleware{"version":3,"sources":["webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}C 6<'// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map (+2xOAAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GAC/E,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GACrG,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,aAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxBwebpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING' /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { public readonly digest = BAILOUT_TO_CSR constructor(public readonly reason: string) { super(`Bail out to client-side rendering: ${reason}`) } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err: unknown): err is BailoutToCSRError { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false } return err.digest === BAILOUT_TO_CSR } BAILOUT_TO_CSRBailoutToCSRErrorreasonisBailoutToCSRError7// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}#false260266undefined566572undefinedA bailout_to_csr_BailoutToCSRErrorI ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js  N1webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcexx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react'; import { DynamicServerError } from '../../client/components/hooks-server-context'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { getRuntimeStagePromise, workUnitAsyncStorage } from './work-unit-async-storage.external'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants'; import { scheduleOnNextTick } from '../../lib/scheduler'; import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'; import { InvariantError } from '../../shared/lib/invariant-error'; const hasPostpone = typeof React.unstable_postpone === 'function'; export function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } export function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } export function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } export function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; export function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } export function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } export function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } export function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } export function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } export function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } export function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } export function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); export function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = "production" !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } export var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); export function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } export function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } export function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map fwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js|middleware{"version":3,"sources":["webpack://../../../src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AACxF,OAAOA,WAAW,QAAO;AA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BjG,kBAAkB,EAAE;YACxC+C,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8QAA8Q,CAAC;YAE3S,MAAM,IAAIlC;QACZ;QAEA,IAAIiI,YAAAA,GAAgC;YAClC,6EAA6E;YAC7E,iFAAiF;YACjF,2CAA2C;YAC3C7D,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,wGAAwG,CAAC;YAErI,MAAM,IAAIlC;QACZ;IACF,OAAO;QACL,IACEsH,kBAAkBhG,iBAAiB,KAAK,SACxCgG,kBAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEA,OAAO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"file":"x"}`2_)BDSU|~ K h l P V > D Z ` {_ ' #"#&&((//00,1+1Q1P1S1Y1x2~2559:_::=;C;<<BBE EMMNN\'\l\\\\]%]3]9]e ff'f=gCgEhKhCHkNk|ww__WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._false{}(/* unused pure expression or super */ null && ())__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._ false0mu/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly const hasPostpone = typeof __WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._.unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if (false) {} break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if (false) {} break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport const trackSynchronousRequestDataAccessInDev = (/* unused pure expression or super */ null && (trackSynchronousPlatformIOAccessInDev)); function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__._}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = false ? 0 : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map x)AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AAC/D;AAEwD;AACQ;AAI9C;AACiC;AACb;AAMhB;AACS;AACwB;AACf;AAEjE,MAAMc,cAAc,OAAOd,kEAAKA,CAACe,iBAAiB,KAAK;AAwChD,SAASC,2BACdC,sBAA2C;IAE3C,OAAO;QACLA;QACAC,iBAAiB,EAAE;QACnBC,2BAA2B;IAC7B;AACF;AAEO,SAASC;IACd,OAAO;QACLC,sBAAsB;QACtBC,oBAAoB;QACpBC,oBAAoB;QACpBC,mBAAmB;QACnBC,eAAe,EAAE;IACnB;AACF;AAEO,SAASC,sBACdC,aAAmC;QAE5BA;IAAP,QAAOA,kCAAAA,cAAcT,eAAe,CAAC,OAAE,gBAAhCS,gCAAkCC,UAAU;AACrD;AAEA;;;;;;CAMC,GACM,SAASC,0BACdC,KAAgB,EAChBC,aAAuE,EACvEH,UAAkB;IAElB,IAAIG,eAAe;QACjB,OAAQA,cAAcC,IAAI;YACxB,KAAK;YACL,KAAK;gBACH,iEAAiE;gBACjE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,MAAM,IAAIlC;QACZ;QAEA,IAAIiI,YAAAA,GAAgC;YAClC,6EAA6E;YAC7E,iFAAiF;YACjF,2CAA2C;YAC3C7D,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,wGAAwG,CAAC;YAErI,MAAM,IAAIlC;QACZ;IACF,OAAO;QACL,IACEsH,kBAAkBhG,iBAAiB,KAAK,SACxCgG,kBAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACTwebpack://../../../src/server/app-render/dynamic-rendering.tsx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ import type { WorkStore } from '../app-render/work-async-storage.external' import type { WorkUnitStore, RequestStore, PrerenderStoreLegacy, PrerenderStoreModern, PrerenderStoreModernRuntime, } from '../app-render/work-unit-async-storage.external' // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react' import { DynamicServerError } from '../../client/components/hooks-server-context' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { getRuntimeStagePromise, workUnitAsyncStorage, } from './work-unit-async-storage.external' import { workAsyncStorage } from '../app-render/work-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME, } from '../../lib/framework/boundary-constants' import { scheduleOnNextTick } from '../../lib/scheduler' import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr' import { InvariantError } from '../../shared/lib/invariant-error' const hasPostpone = typeof React.unstable_postpone === 'function' export type DynamicAccess = { /** * If debugging, this will contain the stack trace of where the dynamic access * occurred. This is used to provide more information to the user about why * their page is being rendered dynamically. */ stack?: string /** * The expression that was accessed dynamically. */ expression: string } // Stores dynamic reasons used during an RSC render. export type DynamicTrackingState = { /** * When true, stack information will also be tracked during dynamic access. */ readonly isDebugDynamicAccesses: boolean | undefined /** * The dynamic accesses that occurred during the render. */ readonly dynamicAccesses: Array syncDynamicErrorWithStack: null | Error } // Stores dynamic reasons used during an SSR render. export type DynamicValidationState = { hasSuspenseAboveBody: boolean hasDynamicMetadata: boolean hasDynamicViewport: boolean hasAllowedDynamic: boolean dynamicErrors: Array } export function createDynamicTrackingState( isDebugDynamicAccesses: boolean | undefined ): DynamicTrackingState { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null, } } export function createDynamicValidationState(): DynamicValidationState { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [], } } export function getFirstDynamicReason( trackingState: DynamicTrackingState ): undefined | string { return trackingState.dynamicAccesses[0]?.expression } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic( store: WorkStore, workUnitStore: undefined | Exclude, expression: string ): void { if (workUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender-legacy': case 'prerender-ppr': case 'request': break default: workUnitStore satisfies never } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return if (store.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'prerender-ppr': return postponeWithTracking( store.route, expression, workUnitStore.dynamicTracking ) case 'prerender-legacy': workUnitStore.revalidate = 0 // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration( expression: string, store: WorkStore, prerenderStore: PrerenderStoreLegacy ): never { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) prerenderStore.revalidate = 0 store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } function abortOnSynchronousDynamicDataAccess( route: string, expression: string, prerenderStore: PrerenderStoreModern ): void { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` const error = createPrerenderInterruptedError(reason) prerenderStore.controller.abort(error) const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function abortOnSynchronousPlatformIOAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): void { const dynamicTracking = prerenderStore.dynamicTracking abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } export function trackSynchronousPlatformIOAccessInDev( requestStore: RequestStore ): void { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): never { const prerenderSignal = prerenderStore.controller.signal if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } throw createPrerenderInterruptedError( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` ) } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack) } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev /** * This component will call `React.postpone` that throws the postponed error. */ type PostponeProps = { reason: string route: string } export function Postpone({ reason, route }: PostponeProps): never { const prerenderStore = workUnitAsyncStorage.getStore() const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null postponeWithTracking(route, reason, dynamicTracking) } export function postponeWithTracking( route: string, expression: string, dynamicTracking: null | DynamicTrackingState ): never { assertPostpone() if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } React.unstable_postpone(createPostponeReason(route, expression)) } function createPostponeReason(route: string, expression: string) { return ( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error` ) } export function isDynamicPostpone(err: unknown) { if ( typeof err === 'object' && err !== null && typeof (err as any).message === 'string' ) { return isDynamicPostponeReason((err as any).message) } return false } function isDynamicPostponeReason(reason: string) { return ( reason.includes( 'needs to bail out of prerendering at this point because it used' ) && reason.includes( 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error' ) ) } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw new Error( 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js' ) } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED' function createPrerenderInterruptedError(message: string): Error { const error = new Error(message) ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED return error } type DigestError = Error & { digest: string } export function isPrerenderInterruptedError( error: unknown ): error is DigestError { return ( typeof error === 'object' && error !== null && (error as any).digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error ) } export function accessedDynamicData( dynamicAccesses: Array ): boolean { return dynamicAccesses.length > 0 } export function consumeDynamicAccess( serverDynamic: DynamicTrackingState, clientDynamic: DynamicTrackingState ): DynamicTrackingState['dynamicAccesses'] { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses) return serverDynamic.dynamicAccesses } export function formatDynamicAPIAccesses( dynamicAccesses: Array ): string[] { return dynamicAccesses .filter( (access): access is Required => typeof access.stack === 'string' && access.stack.length > 0 ) .map(({ expression, stack }) => { stack = stack .split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4) .filter((line) => { // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false } return true }) .join('\n') return `Dynamic API Usage Debug - ${expression}:\n${stack}` }) } function assertPostpone() { if (!hasPostpone) { throw new Error( `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js` ) } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal(): AbortSignal { const controller = new AbortController() controller.abort(new BailoutToCSRError('Render in Browser')) return controller.signal } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal( workUnitStore: WorkUnitStore ): AbortSignal | undefined { switch (workUnitStore.type) { case 'prerender': case 'prerender-runtime': const controller = new AbortController() if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(() => { controller.abort() }) } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore) if (runtimeStagePromise) { runtimeStagePromise.then(() => scheduleOnNextTick(() => controller.abort()) ) } else { scheduleOnNextTick(() => controller.abort()) } } return controller.signal case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined default: workUnitStore satisfies never } } export function annotateDynamicAccess( expression: string, prerenderStore: PrerenderStoreModern ) { const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function useDynamicRouteParams(expression: string) { const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore && workUnitStore) { switch (workUnitStore.type) { case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use( makeHangingPromise( workUnitStore.renderSignal, workStore.route, expression ) ) } break } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking( workStore.route, expression, workUnitStore.dynamicTracking ) } break } case 'prerender-runtime': throw new InvariantError( `\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'cache': case 'private-cache': throw new InvariantError( `\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'prerender-legacy': case 'request': case 'unstable-cache': break default: workUnitStore satisfies never } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/ // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6' // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp( `\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)` ) const hasMetadataRegex = new RegExp( `\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]` ) const hasViewportRegex = new RegExp( `\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]` ) const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`) export function trackAllowedDynamicAccess( workStore: WorkStore, componentStack: string, dynamicValidation: DynamicValidationState, clientDynamic: DynamicTrackingState ) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true return } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true return } else if ( hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test( componentStack ) ) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true dynamicValidation.hasSuspenseAboveBody = true return } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true return } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push( clientDynamic.syncDynamicErrorWithStack ) return } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense` const error = createErrorWithComponentOrOwnerStack(message, componentStack) dynamicValidation.dynamicErrors.push(error) return } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack( message: string, componentStack: string ) { const ownerStack = process.env.NODE_ENV !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null const error = new Error(message) error.stack = error.name + ': ' + message + (ownerStack ?? componentStack) return error } export enum PreludeState { Full = 0, Empty = 1, Errored = 2, } export function logDisallowedDynamicError( workStore: WorkStore, error: Error ): void { console.error(error) if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error( `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.` ) } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`) } } } export function throwIfDisallowedDynamic( workStore: WorkStore, prelude: PreludeState, dynamicValidation: DynamicValidationState, serverDynamic: DynamicTrackingState ): void { if (prelude !== PreludeState.Full) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError( workStore, serverDynamic.syncDynamicErrorWithStack ) throw new StaticGenBailoutError() } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors if (dynamicErrors.length > 0) { for (let i = 0; i < dynamicErrors.length; i++) { logDisallowedDynamicError(workStore, dynamicErrors[i]) } throw new StaticGenBailoutError() } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error( `Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport` ) throw new StaticGenBailoutError() } if (prelude === PreludeState.Empty) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error( `Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.` ) throw new StaticGenBailoutError() } } else { if ( dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata ) { console.error( `Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata` ) throw new StaticGenBailoutError() } } } export function delayUntilRuntimeStage( prerenderStore: PrerenderStoreModernRuntime, result: Promise ): Promise { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(() => result) } return result } @ReactgetRuntimeStagePromiseworkUnitAsyncStorageworkAsyncStoragemakeHangingPromiseMETADATA_BOUNDARY_NAMEVIEWPORT_BOUNDARY_NAMEOUTLET_BOUNDARY_NAMEROOT_LAYOUT_BOUNDARY_NAMEscheduleOnNextTickhasPostponeunstable_postponecreateDynamicTrackingStateisDebugDynamicAccessesdynamicAccessessyncDynamicErrorWithStackcreateDynamicValidationStatehasSuspenseAboveBodyhasDynamicMetadatahasDynamicViewporthasAllowedDynamicdynamicErrorsgetFirstDynamicReasontrackingStateexpressionmarkCurrentScopeAsDynamicstoreworkUnitStoretypeforceDynamicforceStaticdynamicShouldErrorvpostponeWithTrackingdynamicTrackingdynamicUsageDescriptiondynamicUsageStackstackNODE_ENVusedDynamicthrowToInterruptStaticGenerationprerenderStoretrackDynamicDataInDynamicRenderabortOnSynchronousDynamicDataAccesscreatePrerenderInterruptedErrorcontrollerabortpushlabortOnSynchronousPlatformIOAccesserrorWithStacktrackSynchronousPlatformIOAccessInDevrequestStoreprerenderPhaseabortAndThrowOnSynchronousRequestDataAccessprerenderSignalsignalabortedwarnOnSyncDynamicErrortrackSynchronousRequestDataAccessInDevPostponegetStoreassertPostponecreatePostponeReasonisDynamicPostpone^isDynamicPostponeReason+NEXT_PRERENDER_INTERRUPTEDUisPrerenderInterruptedErroraccessedDynamicDataconsumeDynamicAccessserverDynamicclientDynamicformatDynamicAPIAccessesfilteraccess3lline?createRenderInBrowserAbortSignalAbortControllercreateHangingInputAbortSignalcacheSignalinputReadyruntimeStagePromiseannotateDynamicAccessuseDynamicRouteParamsworkStorefallbackParamsfallbackRouteParamsuserenderSignalhasSuspenseRegexbodyAndImplicitTagshasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegexRegExphasMetadataRegexhasViewportRegexhasOutletRegextrackAllowedDynamicAccesscomponentStackdynamicValidationtestcreateErrorWithComponentOrOwnerStackownerStackcaptureOwnerStack9PreludeStatelogDisallowedDynamicErrordevhasReadableErrorStacksthrowIfDisallowedDynamicpreludeidelayUntilRuntimeStagexx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react'; import { DynamicServerError } from '../../client/components/hooks-server-context'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { getRuntimeStagePromise, workUnitAsyncStorage } from './work-unit-async-storage.external'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants'; import { scheduleOnNextTick } from '../../lib/scheduler'; import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'; import { InvariantError } from '../../shared/lib/invariant-error'; const hasPostpone = typeof React.unstable_postpone === 'function'; export function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } export function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } export function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } export function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; export function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } export function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } export function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } export function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } export function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } export function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } export function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } export function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); export function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = "production" !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } export var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); export function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } export function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } export function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map {"version":3,"sources":["webpack://../../../src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AACxF,OAAOA,WAAW,QAAO;AAEzB,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,sBAAsB,EACtBC,oBAAoB,QACf,qCAAoC;AAC3C,SAASC,gBAAgB,QAAQ,4CAA2C;AAC5E,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,QACpB,yCAAwC;AAC/C,SAASC,kBAAkB,QAAQ,sBAAqB;AACxD,SAASC,iBAAiB,QAAQ,+CAA8C;AAChF,SAASC,cAAc,QAAQ,mCAAkC;AAEjE,MAAMC,cAAc,OAAOd,MAAMe,iBAAiB,KAAK;AAwCvD,OAAO,SAASC,2BACdC,sBAA2C;IAE3C,OAAO;QACLA;QACAC,iBAAiB,EAAE;QACnBC,2BAA2B;IAC7B;AACF;AAEA,OAAO,SAASC;IACd,OAAO;QACLC,sBAAsB;QACtBC,oBAAoB;QACpBC,oBAAoB;QACpBC,mBAAmB;QACnBC,eAAe,EAAE;IACnB;AACF;AAEA,OAAO,SAASC,sBACdC,aAAmC;QAE5BA;IAAP,OAAA,CAAOA,kCAAAA,cAAcT,eAAe,CAAC,EAAA,AAAE,KAAA,OAAA,KAAA,IAAhCS,gCAAkCC,UAAU;AACrD;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAgB,EAChBC,aAAuE,EACvEH,UAAkB;IAElB,IAAIG,eAAe;QACjB,OAAQA,cAAcC,IAAI;YACxB,KAAK;YACL,KAAK;gBACH,iEAAiE;gBAC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A,cAAc2D,MAAM,GAAG,GAAG;YAC5B,IAAK,IAAIgD,IAAI,GAAGA,IAAI3G,cAAc2D,MAAM,EAAEgD,IAAK;gBAC7CL,0BAA0BtB,WAAWhF,aAAa,CAAC2G,EAAE;YACvD;YAEA,MAAM,IAAIlI;QACZ;QAEA,sEAAsE;QACtE,wDAAwD;QACxD,yEAAyE;QACzE,wDAAwD;QACxD,IAAIsH,kBAAkBjG,kBAAkB,EAAE;YACxC+C,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8QAA8Q,CAAC;YAE3S,MAAM,IAAIlC;QACZ;QAEA,IAAIiI,YAAAA,GAAgC;YAClC,6EAA6E;YAC7E,iFAAiF;YACjF,2CAA2C;YAC3C7D,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,wGAAwG,CAAC;YAErI,MAAM,IAAIlC;QACZ;IACF,OAAO;QACL,IACEsH,kBAAkBhG,iBAAiB,KAAK,SACxCgG,kBAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEA,OAAO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"file":"x"}false15771602undefined16041685undefined16871776undefined17781875undefined18771953undefined19552018undefined20202172undefined21742230undefined22322312undefined23142379undefined24082412__WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._undefined24482454undefined26402646undefined28782884undefined34183424undefined60116039falseundefined60426114{}undefined64066412undefined73497355undefined81368164falseundefined81678231{}undefined89888994undefined97459751undefined1038310389undefined1216512171undefined1253412540undefined1258812587(/* unused pure expression or super */ null && (undefined1262512624))undefined1262712633undefined1292012926undefined1374213748undefined1484414850undefined1506915075undefined1516515171undefined1551815524undefined1712317129undefined1769017696undefined1983919845undefined2017520181undefined2356723591__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2366023681__WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2374423765__WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2382623845__WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2385923865undefined2606826123 falseundefined26127261510undefined2642926435undefined2669326699undefined2746427470undefined3058830594undefined` UN$_}....IO\OXXX7YvYYZZreact_react_serverdynamic_rendering_postponeWithTrackingdynamic_rendering_throwToInterruptStaticGenerationdynamic_rendering_trackDynamicDataInDynamicRender: ;// ./node_modules/next/dist/esm/server/request/utils.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceLimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } export function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map Wwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/request/utils.js|middlewareb {"version":3,"sources":["webpack://../../../src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;AAGvF,OAAO,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEA,OAAO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,AAAkB,MAAK;AAChD","ignoreList":[0],"file":"x"}aY[Hrx[aX^~ function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map xAAAyF;AACF;AAGhF,SAASE,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,qBAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,qBAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,qBAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,MAAuB;AAChDwebpack://../../../src/server/request/utils.ts,import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external' import type { WorkStore } from '../app-render/work-async-storage.external' export function throwWithStaticGenerationBailoutError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwWithStaticGenerationBailoutErrorWithDynamicError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwForSearchParamsAccessInUseCache( workStore: WorkStore, constructorOpt: Function ): never { const error = new Error( `Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, constructorOpt) workStore.invalidDynamicUsageError ??= error throw error } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore() return afterTaskStore?.rootTaskSpawnPhase === 'action' } `*afterTaskAsyncStoragethrowWithStaticGenerationBailoutErrorthrowWithStaticGenerationBailoutErrorWithDynamicErrorthrowForSearchParamsAccessInUseCacheˎconstructorOpt(captureStackTraceinvalidDynamicUsageErrorisRequestAPICallableInsideAfterafterTaskStorerootTaskSpawnPhaseLimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } export function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map b {"version":3,"sources":["webpack://../../../src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;AAGvF,OAAO,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEA,OAAO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,AAAkB,MAAK;AAChD","ignoreList":[0],"file":"x"}_false089undefined91178undefined180186undefined626632undefined11151121undefined18801886undefinedAutils_isRequestAPICallableInsideAfter? ;// ./node_modules/next/dist/esm/server/request/connection.js  ?webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceMimport { workAsyncStorage } from '../app-render/work-async-storage.external'; import { throwForMissingRequestStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender } from '../app-render/dynamic-rendering'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { makeHangingPromise, makeDevtoolsIOAwarePromise } from '../dynamic-rendering-utils'; import { isRequestAPICallableInsideAfter } from './utils'; /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if ("production" === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map \webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/request/connection.js|middleware^!{"version":3,"sources":["webpack://../../../src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynamicTracking","process","env","NODE_ENV"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,4CAA2C;AAC5E,SACEC,2BAA2B,EAC3BC,oBAAoB,QACf,iDAAgD;AACvD,SACEC,oBAAoB,EACpBC,gCAAgC,EAChCC,+BAA+B,QAC1B,kCAAiC;AACxC,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,kBAAkB,EAClBC,0BAA0B,QACrB,6BAA4B;AACnC,SAASC,+BAA+B,QAAQ,UAAS;AAEzD;;;;CAIC,GACD,OAAO,SAASC;IACd,MAAMC,oBAAoB;IAC1B,MAAMC,YAAYZ,iBAAiBa,QAAQ;IAC3C,MAAMC,gBAAgBZ,qBAAqBW,QAAQ;IAEnD,IAAID,WAAW;QACb,IACEE,iBACAA,cAAcC,KAAK,KAAK,WACxB,CAACN,mCACD;YACA,MAAM,OAAA,cAEL,CAFK,IAAIO,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,6UAA6U,CAAC,GADnW,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,IAAIL,UAAUM,WAAW,EAAE;YACzB,sEAAsE;YACtE,+CAA+C;YAC/C,OAAOC,QAAQC,OAAO,CAACC;QACzB;QAEA,IAAIT,UAAUU,kBAAkB,EAAE;YAChC,MAAM,OAAA,cAEL,CAFK,IAAIhB,sBACR,CAAC,MAAM,EAAEM,UAAUK,KAAK,CAAC,oNAAoN,CAAC,GAD1O,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,IAAIH,eAAe;YACjB,OAAQA,cAAcS,IAAI;gBACxB,KAAK;oBAAS;wBACZ,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIR,MAChB,CAAC,MAAM,EAAEJ,UA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x"} aLNNKM> Ebefalse{}nk /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if (false) {} else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map oryx?AAA4E;AAIrB;AAKf;AACiD;AAItD;AACsB;AAEzD;;;;CAIC,GACM,SAASU;IACd,MAAMC,oBAAoB;IAC1B,MAAMC,YAAYZ,iBAAiBa,QAAQ;IAC3C,MAAMC,gBAAgBZ,qBAAqBW,QAAQ;IAEnD,IAAID,WAAW;QACb,IACEE,iBACAA,cAAcC,KAAK,KAAK,WACxB,CAACN,mCACD;YACA,MAAM,qBAEL,CAFK,IAAIO,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,6UAA6U,CAAC,GADnW;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,IAAIL,UAAUM,WAAW,EAAE;YACzB,sEAAsE;YACtE,+CAA+C;YAC/C,OAAOC,QAAQC,OAAO,CAACC;QACzB;QAE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,IAAIe,KAAoB,EAAoB,EAK3C,MAAM;wBACL,OAAOV,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9Bwebpack://../../../src/server/request/connection.ts]import { workAsyncStorage } from '../app-render/work-async-storage.external' import { throwForMissingRequestStore, workUnitAsyncStorage, } from '../app-render/work-unit-async-storage.external' import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender, } from '../app-render/dynamic-rendering' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { makeHangingPromise, makeDevtoolsIOAwarePromise, } from '../dynamic-rendering-utils' import { isRequestAPICallableInsideAfter } from './utils' /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection(): Promise { const callingExpression = 'connection' const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore) { if ( workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter() ) { throw new Error( `Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after` ) } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined) } if (workStore.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'cache': { const error = new Error( `Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = new Error( `Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'unstable-cache': throw new Error( `Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache` ) case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise( workUnitStore.renderSignal, workStore.route, '`connection()`' ) case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking( workStore.route, 'connection', workUnitStore.dynamicTracking ) case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration( 'connection', workStore, workUnitStore ) case 'request': trackDynamicDataInDynamicRender(workUnitStore) if (process.env.NODE_ENV === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined) } else { return Promise.resolve(undefined) } default: workUnitStore satisfies never } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression) } ` bthrowForMissingRequestStore`~ bmakeDevtoolsIOAwarePromiseconnectioncallingExpressionvphasexpqyv {\]Mimport { workAsyncStorage } from '../app-render/work-async-storage.external'; import { throwForMissingRequestStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender } from '../app-render/dynamic-rendering'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { makeHangingPromise, makeDevtoolsIOAwarePromise } from '../dynamic-rendering-utils'; import { isRequestAPICallableInsideAfter } from './utils'; /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if ("production" === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ^!{"version":3,"sources":["webpack://../../../src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynam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A;oBACR;gBACA,KAAK;oBAAiB;wBACpB,qEAAqE;wBACrE,oEAAoE;wBACpE,4DAA4D;wBAC5D,MAAMA,QAAQ,OAAA,cAEb,CAFa,IAAIR,MAChB,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,iXAAiX,CAAC,GAD/X,qBAAA;mCAAA;wCAAA;0CAAA;wBAEd;wBACAD,MAAMS,iBAAiB,CAACD,OAAOd;wBAC/BE,UAAUc,wBAAwB,KAAKF;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBACH,MAAM,OAAA,cAEL,CAFK,IAAIR,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,0XAA0X,CAAC,GADhZ,qBAAA;+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,OAAOV,mBACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,OAAOd,qBACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,OAAOxB,iCACL,cACAQ,WACAE;gBAEJ,KAAK;oBACHT,gCAAgCS;oBAChC,IAAIe,AA1Fc,QA0FNC,GAAG,CAACC,KAAa,GAAL,YAAoB;wBAC1C,wEAAwE;wBACxE,8EAA8E;wBAC9E,4EAA4E;wBAC5E,OAAOvB,2BAA2Ba;oBACpC,OAAO;wBACL,OAAOF,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9B","ignoreList":[0],"file":"x"}false076undefined78192undefined194331undefined333422undefined424515undefined517574undefined777783undefined62136242falseundefined62456638{}undefinedD ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js  Jwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; export function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } export function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map awebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js|middlewareR {"version":3,"sources":["webpack://../../../../src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAErC,OAAO,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEA,OAAO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEA,OAAO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0],"file":"x"}EV// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map WZaxFAAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAE9B,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAACwebpack://../../../../src/shared/lib/utils/reflect-utils.tsh// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/ export function describeStringPropertyAccess(target: string, prop: string) { if (isDefinitelyAValidIdentifier.test(prop)) { return `\`${target}.${prop}\`` } return `\`${target}[${JSON.stringify(prop)}]\`` } export function describeHasCheckingStringProperty( target: string, prop: string ) { const stringifiedProp = JSON.stringify(prop) return `\`Reflect.has(${target}, ${stringifiedProp})\`, \`${stringifiedProp} in ${target}\`, or similar` } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule', ]) ` isDefinitelyAValidIdentifierdescribeStringPropertyAccesstargetpropdescribeHasCheckingStringPropertystringifiedPropwellKnownPropertiesSet// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; export function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } export function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map R {"version":3,"sources":["webpack://../../../../src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAErC,OAAO,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEA,OAAO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEA,OAAO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0],"file":"x"}2false466472undefined695701undefined939945undefinedCreflect_utils_describeStringPropertyAccessreflect_utils_wellKnownPropertiesU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js  Wwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const actionAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|sharedc?AGk@__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._9 const actionAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=action-async-storage-instance.js.map :=Dx AAAgE;AACzD,mCAAmC,oHAAuB;;AAEjEwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|sharedimport { createAsyncLocalStorage } from './async-local-storage'; export const actionAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.mapE webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared063undefined6571undefined107129__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`$@U ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource.// Share the instance module in the next-shared layer import { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { actionAsyncStorageInstance as actionAsyncStorage }; //# sourceMappingURL=action-async-storage.external.js.map#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared`6B(r// Share the instance module in the next-shared layer //# sourceMappingURL=action-async-storage.external.js.map ),3xAAAA;AAGE;AAC0D;;AAE5D#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared.// Share the instance module in the next-shared layer import { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { actionAsyncStorageInstance as actionAsyncStorage }; //# sourceMappingURL=action-async-storage.external.js.map4@webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared54181undefined183242undefined4 ;// ./node_modules/next/dist/esm/lib/picocolors.js  pwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource, // 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'); 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.mapQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware`_CBEKIO1 7 g m   WI O  6 < p v  # V \ (/* unused pure expression or super */ null && ()) // 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'); 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; }; }; const reset = (/* unused pure expression or super */ null && (enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String)); const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m'); const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m'); const italic = formatter('\x1b[3m', '\x1b[23m'); const underline = formatter('\x1b[4m', '\x1b[24m'); const inverse = formatter('\x1b[7m', '\x1b[27m'); const hidden = formatter('\x1b[8m', '\x1b[28m'); const strikethrough = formatter('\x1b[9m', '\x1b[29m'); const black = formatter('\x1b[30m', '\x1b[39m'); const red = formatter('\x1b[31m', '\x1b[39m'); const green = formatter('\x1b[32m', '\x1b[39m'); const yellow = formatter('\x1b[33m', '\x1b[39m'); const blue = formatter('\x1b[34m', '\x1b[39m'); const magenta = formatter('\x1b[35m', '\x1b[39m'); const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m'); const cyan = formatter('\x1b[36m', '\x1b[39m'); const white = formatter('\x1b[37m', '\x1b[39m'); const gray = formatter('\x1b[90m', '\x1b[39m'); const bgBlack = formatter('\x1b[40m', '\x1b[49m'); const bgRed = formatter('\x1b[41m', '\x1b[49m'); const bgGreen = formatter('\x1b[42m', '\x1b[49m'); const bgYellow = formatter('\x1b[43m', '\x1b[49m'); const bgBlue = formatter('\x1b[44m', '\x1b[49m'); const bgMagenta = formatter('\x1b[45m', '\x1b[49m'); const bgCyan = formatter('\x1b[46m', '\x1b[49m'); const bgWhite = formatter('\x1b[47m', '\x1b[49m'); //# sourceMappingURL=picocolors.js.map "x]AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,cAAc,yEAAyB,EAAE,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,EAAE,IAAI,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEPQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware, // 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'); 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#_webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware17941800undefined18151814(/* unused pure expression or super */ null && (undefined18591858))undefined18611867undefined19341940undefined20062012undefined20622068undefined21212127undefined21782184undefined22342240undefined22972303undefined23532359undefined24072413undefined24632469undefined25202526undefined25752581undefined26332639undefined27042710undefined27592765undefined28152821undefined28702876undefined29282934undefined29842990undefined30423048undefined31013107undefined31583164undefined32183224undefined32753281undefinedC picocolors_resetpicocolors_hidden6 ;// ./node_modules/next/dist/esm/build/output/log.js  *webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'; import { LRUCache } from '../../server/lib/lru-cache'; export const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } export function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } export function wait(...message) { prefixedLog('wait', ...message); } export function error(...message) { prefixedLog('error', ...message); } export function warn(...message) { prefixedLog('warn', ...message); } export function ready(...message) { prefixedLog('ready', ...message); } export function info(...message) { prefixedLog('info', ...message); } export function event(...message) { prefixedLog('event', ...message); } export function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); export function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.mapSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middlewarecOQ_-136JPRUN%kqKQ%+__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._ const prefixes = { wait: __WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('○')), error: __WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('⨯')), warn: __WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('⚠')), ready: '▲', info: __WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._(' ')), event: __WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('✓')), trace: __WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } function wait(...message) { prefixedLog('wait', ...message); } function error(...message) { prefixedLog('error', ...message); } function warn(...message) { prefixedLog('warn', ...message); } function ready(...message) { prefixedLog('ready', ...message); } function info(...message) { prefixedLog('info', ...message); } function event(...message) { prefixedLog('event', ...message); } function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new __WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._(10000, (value)=>value.length); function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map xAAAgF;AAC1B;AAC/C;AACP,UAAU,gFAAK,CAAC,8EAAI;AACpB,WAAW,4EAAG,CAAC,8EAAI;AACnB,UAAU,kFAAM,CAAC,8EAAI;AACrB;AACA,UAAU,gFAAK,CAAC,8EAAI;AACpB,WAAW,gFAAK,CAAC,8EAAI;AACrB,WAAW,oFAAO,CAAC,8EAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA,0BAA0B,iFAAQ;AAC3B;AACP;AACA;AACA;AACA;AACA;AACA;;AAEASwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'; import { LRUCache } from '../../server/lib/lru-cache'; export const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } export function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } export function wait(...message) { prefixedLog('wait', ...message); } export function error(...message) { prefixedLog('error', ...message); } export function warn(...message) { prefixedLog('warn', ...message); } export function ready(...message) { prefixedLog('ready', ...message); } export function info(...message) { prefixedLog('info', ...message); } export function event(...message) { prefixedLog('event', ...message); } export function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); export function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware079undefined81134undefined136142undefined172176__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined178181__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined201203__WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__._undefined205208__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined227232__WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__._undefined234237__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined272276__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined278281__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined301305__WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__._undefined307310__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined330336__WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__._undefined338341__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined12661272undefined14931499undefined15671573undefined16431649undefined17171723undefined17931799undefined18671873undefined19431949undefined20452052__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined20852091undefinedcnp\k~ABDG a e  1 8 whiteboldredyellowgreenmagentalog_eventlog_tracelog_warnOnce@ ;// ./node_modules/next/dist/esm/server/request/root-params.js  xwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcey5import { InvariantError } from '../../shared/lib/invariant-error'; import { postponeWithTracking, throwToInterruptStaticGeneration } from '../app-render/dynamic-rendering'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils'; import { actionAsyncStorage } from '../app-render/action-async-storage.external'; import { warnOnce } from '../../build/output/log'; const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map ]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/request/root-params.js|middlewareH{"version":3,"sources":["webpack://../../../src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":"AAA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;QACL,KAAK;QACL;IACF;IAEA,MAAMxB,mBAAmBC,eAAeJ,UAAU;IAElD,OAAQI,eAAeN,IAAI;QACzB,KAAK;YAAa;gBAChB,mCAAmC;gBACnC,+DAA+D;gBAC/D,IACEM,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOzC,mBACLmB,eAAeS,YAAY,EAC3BpB,UAAUI,KAAK,EACf8B;gBAEJ;gBACA;YACF;QACA,KAAK;YAAiB;gBACpB,mEAAmE;gBACnE,0FAA0F;gBAC1F,IACEvB,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOO,6BACLP,WACAjC,WACAW,gBACAuB;gBAEJ;gBACA;YACF;QACA,KAAK;YAAoB;gBAEvB;YACF;QACA;YAAS;gBACPvB;YACF;IACF;IAEA,uFAAuF;IACvF,OAAOH,QAAQC,OAAO,CAACC,gBAAgB,CAACuB,UAAU;AACpD;AAEA,yFAAyF,GACzF,eAAeO,6BACbP,SAAiB,EACjBjC,SAAoB,EACpBW,cAAwD,EACxDuB,OAAe;IAEf,MAAML,aAAapC,6BAA6ByC,SAASD;IACzD,8DAA8D;IAC9D,gFAAgF;IAChF,yFAAyF;IACzF,qGAAqG;IACrG,OAAQtB,eAAeN,IAAI;QACzB,KAAK;YAAiB;gBACpB,OAAOjB,qBACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACF","ignoreList":[0],"file":"x"} aACPPRMO2 const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map x AAAiE;AAIzB;AAIU;AAMK;AACQ;AAMlB;AACmC;AAC/B;AAGjD,MAAMU,eAAe,IAAIC;AAEzB;;CAEC,GACM,eAAeC;IACpBH,SACE;IAEF,MAAMI,YAAYV,iBAAiBW,QAAQ;IAC3C,IAAI,CAACD,WAAW;QACd,MAAM,qBAA8D,CAA9D,IAAIb,eAAe,6CAAnB;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMe,gBAAgBX,qBAAqBU,QAAQ;IAEnD,IAAI,CAACC,eAAe;QAClB,MAAM,qBAEL,CAFK,IAAIC,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,8FAA8F,CAAC,GADpH;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,OAAQF,cAAcG,IAAI;QACxB,KAAK;QACL,KAAK;YAAkB;gBACrB,MAAM,qBAEL,CAFK,IAAIF,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,kKAAkK,CAAC,GADxL;2BAAA;gCAAA;kCAAA;gBAEN;YACF;QACA,KAA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eAAeN,IAAI;QACzB,KAAK;YAAoB;gBACvB,MAAM,qBAEL,CAFK,IAAIlB,eACR,GAAG+C,QAAQ,0EAA0E,EAAEA,QAAQ,+EAA+E,CAAC,GAD3K;2BAAA;gCAAA;kCAAA;gBAEN;YACF;QACA,KAAK;QACL,KAAK;QACL,KAAK;QACL;IACF;IAEA,MAAMxB,mBAAmBC,eAAeJ,UAAU;IAElD,OAAQI,eAAeN,IAAI;QACzB,KAAK;YAAa;gBAChB,mCAAmC;gBACnC,+DAA+D;gBAC/D,IACEM,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOzC,mBACLmB,eAAeS,YAAY,EAC3BpB,UAAUI,KAAK,EACf8B;gBAEJ;gBACA;YACF;QACA,KAAK;YAAiB;gBACpB,mEAAmE;gBACnE,0FAA0F;gBAC1F,IACEvB,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOO,6BACLP,WACAjC,WACAW,gBACAuB;gBAEJ;gBACA;YACF;QACA,KAAK;YAAoB;gBAEvB;YACF;QACA;YAAS;gBACPvB;YACF;IACF;IAEA,uFAAuF;IACvF,OAAOH,QAAQC,OAAO,CAACC,gBAAgB,CAACuB,UAAU;AACpD;AAEA,yFAAyF,GACzF,eAAeO,6BACbP,SAAiB,EACjBjC,SAAoB,EACpBW,cAAwD,EACxDuB,OAAe;IAEf,MAAML,aAAapC,6BAA6ByC,SAASD;IACzD,8DAA8D;IAC9D,gFAAgF;IAChF,yFAAyF;IACzF,qGAAqG;IACrG,OAAQtB,eAAeN,IAAI;QACzB,KAAK;YAAiB;gBACpB,OAAOjB,qBACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACFwebpack://../../../src/server/request/root-params.ts.import { InvariantError } from '../../shared/lib/invariant-error' import { postponeWithTracking, throwToInterruptStaticGeneration, } from '../app-render/dynamic-rendering' import { workAsyncStorage, type WorkStore, } from '../app-render/work-async-storage.external' import { workUnitAsyncStorage, type PrerenderStoreLegacy, type PrerenderStorePPR, type StaticPrerenderStore, } from '../app-render/work-unit-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import type { FallbackRouteParams } from './fallback-params' import type { Params, ParamValue } from './params' import { describeStringPropertyAccess, wellKnownProperties, } from '../../shared/lib/utils/reflect-utils' import { actionAsyncStorage } from '../app-render/action-async-storage.external' import { warnOnce } from '../../build/output/log' interface CacheLifetime {} const CachedParams = new WeakMap>() /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams(): Promise { warnOnce( '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.' ) const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError('Missing workStore in unstable_rootParams') } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.` ) } switch (workUnitStore.type) { case 'cache': case 'unstable-cache': { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams( workUnitStore.rootParams, workStore, workUnitStore ) case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams) default: return workUnitStore satisfies never } } function createPrerenderRootParams( underlyingParams: Params, workStore: WorkStore, prerenderStore: StaticPrerenderStore ): Promise { switch (prerenderStore.type) { case 'prerender-client': { const exportName = '`unstable_rootParams`' throw new InvariantError( `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.` ) } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const promise = makeHangingPromise( prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`' ) CachedParams.set(underlyingParams, promise) return promise } } } break } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams( underlyingParams, fallbackParams, workStore, prerenderStore ) } } } break } case 'prerender-legacy': break default: prerenderStore satisfies never } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams) } function makeErroringRootParams( underlyingParams: Params, fallbackParams: FallbackRouteParams, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy ): Promise { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const augmentedUnderlying = { ...underlyingParams } // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying) CachedParams.set(underlyingParams, promise) Object.keys(underlyingParams).forEach((prop) => { if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get() { const expression = describeStringPropertyAccess( 'unstable_rootParams', prop ) // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } else { // Legacy Prerender throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } }, enumerable: true, }) } else { ;(promise as any)[prop] = underlyingParams[prop] } } }) return promise } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName: string): Promise { const apiName = `\`import('next/root-params').${paramName}()\`` const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError(`Missing workStore in ${apiName}`) } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.` ) } const actionStore = actionAsyncStorage.getStore() if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw new Error( `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.` ) } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw new Error( `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.` ) } } switch (workUnitStore.type) { case 'unstable-cache': case 'cache': { throw new Error( `Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise( paramName, workStore, workUnitStore, apiName ) } case 'private-cache': case 'prerender-runtime': case 'request': { break } default: { workUnitStore satisfies never } } return Promise.resolve(workUnitStore.rootParams[paramName]) } function createPrerenderRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: StaticPrerenderStore, apiName: string ): Promise { switch (prerenderStore.type) { case 'prerender-client': { throw new InvariantError( `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.` ) } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams switch (prerenderStore.type) { case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeHangingPromise( prerenderStore.renderSignal, workStore.route, apiName ) } break } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeErroringRootParamPromise( paramName, workStore, prerenderStore, apiName ) } break } case 'prerender-legacy': { // legacy prerenders can't have fallback params break } default: { prerenderStore satisfies never } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]) } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy, apiName: string ): Promise { const expression = describeStringPropertyAccess(apiName, paramName) // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch (prerenderStore.type) { case 'prerender-ppr': { return postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } case 'prerender-legacy': { return throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } default: { prerenderStore satisfies never } } } `6uactionAsyncStoragewarnOnceCachedParams*unstable_rootParams)rmcreatePrerenderRootParamsrootParamsunderlyingParamsexportName&'keyhascachedParams%&&makeErroringRootParamsaugmentedUnderlyingObjectkeysforEachdefinePropertyenumerablegetRootParamparamNameapiNameactionStoreisAppRouteisActionhcreatePrerenderRootParamPromisemakeErroringRootParamPromiseBy5import { InvariantError } from '../../shared/lib/invariant-error'; import { postponeWithTracking, throwToInterruptStaticGeneration } from '../app-render/dynamic-rendering'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils'; import { actionAsyncStorage } from '../app-render/action-async-storage.external'; import { warnOnce } from '../../build/output/log'; const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map H{"version":3,"sources":["webpack://../../../src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SACEC,oBAAoB,EACpBC,gCAAgC,QAC3B,kCAAiC;AACxC,SACEC,gBAAgB,QAEX,4CAA2C;AAClD,SACEC,oBAAoB,QAIf,iDAAgD;AACvD,SAASC,kBAAkB,QAAQ,6BAA4B;AAG/D,SACEC,4BAA4B,EAC5BC,mBAAmB,QACd,uCAAsC;AAC7C,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,QAAQ,QAAQ,yBAAwB;AAGjD,MAAMC,eAAe,IAAIC;AAEzB;;CAEC,GACD,OAAO,eAAeC;IACpBH,SACE;IAEF,MAAMI,YAAYV,iBAAiBW,QAAQ;IAC3C,IAAI,CAACD,WAAW;QACd,MAAM,OAAA,cAA8D,CAA9D,IAAIb,eAAe,6CAAnB,qBAAA;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMe,gBAAgBX,qBAAqBU,QAAQ;IAEnD,IAAI,CAACC,eAAe;QAClB,MAAM,OAAA,cAEL,CAFK,IAAIC,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,eAAeO,6BACbP,SAAiB,EACjBjC,SAAoB,EACpBW,cAAwD,EACxDuB,OAAe;IAEf,MAAML,aAAapC,6BAA6ByC,SAASD;IACzD,8DAA8D;IAC9D,gFAAgF;IAChF,yFAAyF;IACzF,qGAAqG;IACrG,OAAQtB,eAAeN,IAAI;QACzB,KAAK;YAAiB;gBACpB,OAAOjB,qBACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACF","ignoreList":[0],"file":"x"}false065undefined67171undefined173249undefined251336undefined338401undefined403507undefined509589undefined591640undefined762768undefined73687374undefined> ;// ./node_modules/next/dist/esm/server/web/exports/index.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceM// Alias index file of next/server for edge runtime for tree-shaking purpose export { ImageResponse } from '../spec-extension/image-response'; export { NextRequest } from '../spec-extension/request'; export { NextResponse } from '../spec-extension/response'; export { userAgent, userAgentFromString } from '../spec-extension/user-agent'; export { URLPattern } from '../spec-extension/url-pattern'; export { after } from '../../after'; export { connection } from '../../request/connection'; export { unstable_rootParams } from '../../request/root-params'; //# sourceMappingURL=index.js.map[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware`MNPR)w// Alias index file of next/server for edge runtime for tree-shaking purpose //# sourceMappingURL=index.js.map x8AAAA;AACiE;AACT;AACE;AACoB;AACnB;AACvB;AACkB;AACU;;AAEhE[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middlewareM// Alias index file of next/server for edge runtime for tree-shaking purpose export { ImageResponse } from '../spec-extension/image-response'; export { NextRequest } from '../spec-extension/request'; export { NextResponse } from '../spec-extension/response'; export { userAgent, userAgentFromString } from '../spec-extension/user-agent'; export { URLPattern } from '../spec-extension/url-pattern'; export { after } from '../../after'; export { connection } from '../../request/connection'; export { unstable_rootParams } from '../../request/root-params'; //# sourceMappingURL=index.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware77141undefined143198undefined200257undefined259336undefined338396undefined398433undefined435488undefined490553undefined0 ;// ./node_modules/next/dist/esm/api/server.js  Hwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourcePexport * from '../server/web/exports/index'; //# sourceMappingURL=server.js.mapMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware`+$ //# sourceMappingURL=server.js.map x AAA4C;;AAE5CMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middlewarePexport * from '../server/web/exports/index'; //# sourceMappingURL=server.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware043undefined ;// ./src/middleware.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; 6webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./src/middleware.js|middleware{"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings":"AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAAKK,GAAG,CAACI,KAAKQ,MAAM,CAACC,CAAAA,IAAKN,MAAMM,IAAIP;IACvDK,WAAWG,IAAI,CAACP;IAChBZ,KAAKe,GAAG,CAACN,KAAKO;IACd,OAAO;QACLI,SAASJ,WAAWK,MAAM,IAAIX;QAC9BY,WAAWC,KAAKb,GAAG,CAAC,GAAGA,MAAMM,WAAWK,MAAM;QAC9CG,OAAOD,KAAKE,IAAI,CAACb,MAAM,QAAQW,KAAKE,IAAI,CAACd,WAAW;IACtD;AACF;AAEA,OAAO,SAASe,WAAWvB,OAAO;IAChC,MAAM,EAAEwB,QAAQ,EAAE,GAAGxB,QAAQyB,OAAO;IACpC,IAAI,CAACD,SAASE,UAAU,CAAC,UAAU,OAAOhC,aAAaiC,IAAI;IAE3D,MAAMC,KAAK7B,YAAYC;IACvB,MAAM6B,WAAWC,QAAQC,GAAG,CAACC,SAAS,IAAIF,QAAQC,GAAG,CAACE,oBAAoB,KAAK;IAE/E,IAAI,CAACJ,UAAU;QACb,MAAMK,SAAS7B,oBAAoB,CAAC,GAAG,EAAEuB,IAAI;QAC7C,IAAI,CAACM,OAAOjB,OAAO,EAAE;YACnB,OAAO,IAAIvB,aAAayC,KAAKC,SAAS,CAAC;gBAAEC,OAAO;YAAwC,IAAI;gBAC1FC,QAAQ;gBACRrC,SAAS;oBACP,gBAAgB;oBAChB,qBAAqBsC,OAAO3C;oBAC5B,yBAAyB;oBACzB,qBAAqB2C,OAAOL,OAAOb,KAAK;oBACxC,iBAAiB;gBACnB;YACF;QACF;QACA,MAAMmB,WAAW9C,aAAaiC,IAAI;QAClCa,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAO3C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,aAAaiC,IAAI;AAC1B;AAEA,OAAO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAE","file":"x"}`*Khs__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._ const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); } const config = { matcher: "/api/:path*" }; xAAA2C;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAA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,iFAAYA,CAACiC,IAAI;AAC1B;AAEO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAEwebpack://./src/middleware.jsLimport { NextResponse } from "next/server"; const WINDOW_MS = 60_000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter(t => now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; `1WINDOW_MSMAX_PER_WINDOWhitsmgetClientIprequesttrimcheckRateLimitLocalwindowMsDatetimestampstallowedremainingresetceilmiddleware.nextUrlGnextipuseRedis{|REDIS_URLCOSMIC_REDIS_ENABLED'statusStringresponseconfigmatcherimport { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; {"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings":"AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAAS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C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,aAAaiC,IAAI;AAC1B;AAEA,OAAO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAE","file":"x"}false042undefined746752undefined872883__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined11531164__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._undefined16711682__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19631974__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19861992undefinedG67Pa ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js  )webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource1export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } export function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } export function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map ~webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js|middleware {"version":3,"sources":["webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"file":"x"}G `fnconst HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map oryxkAAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAErC,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACM,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,aAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACFwebpack://../../../../src/client/components/http-access-fallback/http-access-fallback.tsexport const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401, } const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)) export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK' export type HTTPAccessFallbackError = Error & { digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}` } /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError( error: unknown ): error is HTTPAccessFallbackError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const [prefix, httpStatus] = error.digest.split(';') return ( prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)) ) } export function getAccessFallbackHTTPStatus( error: HTTPAccessFallbackError ): number { const httpStatus = error.digest.split(';')[1] return Number(httpStatus) } export function getAccessFallbackErrorTypeByStatus( status: number ): 'not-found' | 'forbidden' | 'unauthorized' | undefined { switch (status) { case 401: return 'unauthorized' case 403: return 'forbidden' case 404: return 'not-found' default: return } } `HTTPAccessErrorStatusNOT_FOUNDFORBIDDENUNAUTHORIZEDALLOWED_CODESvaluesHTTP_ERROR_FALLBACK_ERROR_CODEisHTTPAccessFallbackError!httpStatusNumbergetAccessFallbackHTTPStatusgetAccessFallbackErrorTypeByStatus1export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } export function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } export function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map  {"version":3,"sources":["webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"file":"x"}Nfalse06undefined173179undefined515521undefined864870undefined10011007undefinedAhttp_access_fallback_isHTTPAccessFallbackErrorL ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js  2webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/redirect-status-code.js|middlewareh{"version":3,"sources":["webpack://../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0],"file":"x"}Nvar RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map ORYx8AAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIXwebpack://../../../src/client/components/redirect-status-code.tskexport enum RedirectStatusCode { SeeOther = 303, TemporaryRedirect = 307, PermanentRedirect = 308, } RedirectStatusCodeexport var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map h{"version":3,"sources":["webpack://../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0],"file":"x"}`redirect_status_code_RedirectStatusCodeF ;// ./node_modules/next/dist/esm/client/components/redirect-error.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcecimport { RedirectStatusCode } from './redirect-status-code'; export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; export var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map cwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/redirect-error.js|middlewarei{"version":3,"sources":["webpack://../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAA,CAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0],"file":"x"}d;=CqwA: const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map ;>ExAAA2D;AAEpD,MAAMC,sBAAsB,gBAAe;AAE3C,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACM,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,aAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,OAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElBwebpack://../../../src/client/components/redirect-error.tsimport { RedirectStatusCode } from './redirect-status-code' export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT' export enum RedirectType { push = 'push', replace = 'replace', } export type RedirectError = Error & { digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};` } /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error: unknown): error is RedirectError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const digest = error.digest.split(';') const [errorCode, type] = digest const destination = digest.slice(2, -2).join(';') const status = digest.at(-2) const statusCode = Number(status) return ( errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode ) } `REDIRECT_ERROR_CODERedirectTypeisRedirectErrorerrorCodeCdestinationatstatusCode΅isNaNcimport { RedirectStatusCode } from './redirect-status-code'; export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; export var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map i{"version":3,"sources":["webpack://../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAA,CAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0],"file":"x"}<false059undefined6167undefined113119undefined502508undefinedAredirect_error_isRedirectErrorL ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback'; import { isRedirectError } from './redirect-error'; /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/is-next-router-error.js|middleware{"version":3,"sources":["webpack://../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0],"file":"x"}aWYB<BO /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map ")xWAAGoD;AACkB;AAEtE;;;;CAIC,GACM,SAASE,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7Dwebpack://../../../src/client/components/is-next-router-error.ts"import { isHTTPAccessFallbackError, type HTTPAccessFallbackError, } from './http-access-fallback/http-access-fallback' import { isRedirectError, type RedirectError } from './redirect-error' /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError( error: unknown ): error is RedirectError | HTTPAccessFallbackError { return isRedirectError(error) || isHTTPAccessFallbackError(error) } isNextRouterErrorimport { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback'; import { isRedirectError } from './redirect-error'; /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map {"version":3,"sources":["webpack://../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0],"file":"x"}.false087undefined89139undefined316322undefined ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport "next/dist/server/web/globals"; import { adapter } from "next/dist/server/web/adapter"; // Import the userland code. import * as _mod from "private-next-root-dir/src/middleware.js"; import { edgeInstrumentationOnRequestError } from "next/dist/server/web/globals"; import { isNextRouterError } from "next/dist/client/components/is-next-router-error"; const mod = { ..._mod }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (process.env.NODE_ENV !== 'production') { if (isNextRouterError(err)) { err.message = `Next.js navigation API is not allowed to be used in Middleware.`; throw err; } } const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } export default function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middlewaree %']|P cz}Vv 06__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._false{}__WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._ S // Import the userland code. const mod = { ...__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._ }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (false) {} const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await __WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__._(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } function nHandler(opts) { return __WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map  xsAAAsC;AACiB;AACvD;AACgE;AACiB;AACI;AACrF;AACA,OAAO,8CAAI;AACX;AACA;AACA;AACA;AACA,6DAA6D,KAAK;AAClE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,gBAAgB,KAAqC,EAAE,EAK1C;AACb;AACA;AACA;AACA,kBAAkB,uIAAiC;AACnD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACe;AACf,WAAW,oFAAO;AAClB;AACA;AACA;AACA,KAAK;AACL;;AAEAwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middlewareimport "next/dist/server/web/globals"; import { adapter } from "next/dist/server/web/adapter"; // Import the userland code. import * as _mod from "private-next-root-dir/src/middleware.js"; import { edgeInstrumentationOnRequestError } from "next/dist/server/web/globals"; import { isNextRouterError } from "next/dist/client/components/is-next-router-error"; const mod = { ..._mod }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (process.env.NODE_ENV !== 'production') { if (isNextRouterError(err)) { err.message = `Next.js navigation API is not allowed to be used in Middleware.`; throw err; } } const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } export default function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware037undefined3993undefined124187undefined189269undefined271355undefined378381__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._undefined12221258falseundefined12611471{}undefined16221654__WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__._undefined20442058undefined20962102__WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._undefineda7dCL}middleware_namespaceObjectedgeInstrumentationOnRequestErroradapterbuffersizemaps// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (false) {} // The condition is true when the "process" module is provided if (process !== __webpack_require__.g.process) { // prefer local process but global.process has correct "env" process.env = __webpack_require__.g.process.env; __webpack_require__.g.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.map ;// ./node_modules/next/dist/esm/server/web/error.js class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map ;// ./node_modules/next/dist/esm/lib/constants.js const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; const MATCHED_PATH_HEADER = 'x-matched-path'; const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; const RSC_SEGMENT_SUFFIX = '.segment.rsc'; const RSC_SUFFIX = '.rsc'; const ACTION_SUFFIX = '.action'; const NEXT_DATA_SUFFIX = '.json'; const NEXT_META_SUFFIX = '.meta'; const NEXT_BODY_SUFFIX = '.body'; const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well const NEXT_CACHE_TAG_MAX_ITEMS = 128; const NEXT_CACHE_TAG_MAX_LENGTH = 256; const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files const MIDDLEWARE_FILENAME = 'middleware'; const MIDDLEWARE_LOCATION_REGEXP = (/* unused pure expression or super */ null && (`(?:src/)?${MIDDLEWARE_FILENAME}`)); // Pattern to detect instrumentation hooks file const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias const PAGES_DIR_ALIAS = 'private-next-pages'; const DOT_NEXT_ALIAS = 'private-dot-next'; const ROOT_DIR_ALIAS = 'private-next-root-dir'; const APP_DIR_ALIAS = 'private-next-app-dir'; const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; const PUBLIC_DIR_MIDDLEWARE_CONFLICT = (/* unused pure expression or super */ null && (`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`)); const SSG_GET_INITIAL_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`)); const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`)); const SERVER_PROPS_SSG_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`)); const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = (/* unused pure expression or super */ null && (`can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`)); const SERVER_PROPS_EXPORT_ERROR = (/* unused pure expression or super */ null && (`pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`)); const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; const UNSTABLE_REVALIDATE_RENAME_ERROR = (/* unused pure expression or super */ null && ('The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.')); const GSSP_COMPONENT_MEMBER_ERROR = (/* unused pure expression or super */ null && (`can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`)); const NON_STANDARD_NODE_ENV = (/* unused pure expression or super */ null && (`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`)); const SSG_FALLBACK_EXPORT_ERROR = (/* unused pure expression or super */ null && (`Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`)); const ESLINT_DEFAULT_DIRS = (/* unused pure expression or super */ null && ([ 'app', 'pages', 'components', 'lib', 'src' ])); const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/server/web/utils.js /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js /** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/server/web/next-url.js const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !undefined, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js //# sourceMappingURL=cookies.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (false) {} if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new _edge_runtime_cookies.RequestCookies(this.headers), nextUrl, url: false ? 0 : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js const response_INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new _edge_runtime_cookies.ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof _edge_runtime_cookies.ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>(0,_edge_runtime_cookies.stringifyCookie)(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[response_INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[response_INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js /** * The result of parsing a URL relative to a base URL. */ function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/server/internal-utils.js const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js /** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/segment.js function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } const PAGE_SEGMENT_KEY = '__PAGE__'; const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js /** * @internal */ class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function async_local_storage_createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js const workAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=work-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js /** * @internal */ class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } class request_cookies_RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorageInstance.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } function request_cookies_responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js /** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var constants_NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(constants_NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js /** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (true) { api = __webpack_require__(817); } else {} const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const tracer_getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); //# sourceMappingURL=tracer.js.map ;// ./node_modules/next/dist/esm/server/api-utils/index.js function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; const RESPONSE_LIMIT_DEFAULT = (/* unused pure expression or super */ null && (4 * 1024 * 1024)); const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = __webpack_require__(663); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. false && 0)); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.map ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new _edge_runtime_cookies.ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = request_cookies_RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js const workUnitAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const app_router_headers_RSC_HEADER = 'rsc'; const app_router_headers_ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const app_router_headers_NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const app_router_headers_NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const components_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const app_router_headers_NEXT_URL = 'next-url'; const app_router_headers_RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const app_router_headers_FLIGHT_HEADERS = [ app_router_headers_RSC_HEADER, app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER, app_router_headers_NEXT_ROUTER_PREFETCH_HEADER, app_router_headers_NEXT_HMR_REFRESH_HEADER, app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const app_router_headers_NEXT_RSC_UNION_QUERY = '_rsc'; const app_router_headers_NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const app_router_headers_NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const app_router_headers_NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const app_router_headers_NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const app_router_headers_NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const app_router_headers_NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js // Share the instance module in the next-shared layer function work_unit_async_storage_external_throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function work_unit_async_storage_external_getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class lib_invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js /** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.map ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. const tagsManifest = new Map(); const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js /* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; /** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const default_external_DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; /* harmony default export */ const default_external = ((/* unused pure expression or super */ null && (default_external_DefaultCacheHandler))); //# sourceMappingURL=default.external.js.map ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js const handlers_debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { handlers_debug == null ? void 0 : handlers_debug('cache handlers already initialized'); return false; } handlers_debug == null ? void 0 : handlers_debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } handlers_debug == null ? void 0 : handlers_debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map ;// ./node_modules/next/dist/esm/server/revalidation-utils.js /** Run a callback, and execute any *new* revalidations added during its runtime. */ async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const async_local_storage_sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class async_local_storage_FakeAsyncLocalStorage { disable() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } exit() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const async_local_storage_maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function app_render_async_local_storage_createAsyncLocalStorage() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return new async_local_storage_maybeGlobalAsyncLocalStorage(); } return new async_local_storage_FakeAsyncLocalStorage(); } function async_local_storage_bindSnapshot(fn) { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.bind(fn); } return async_local_storage_FakeAsyncLocalStorage.bind(fn); } function async_local_storage_createSnapshot() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js const afterTaskAsyncStorageInstance = app_render_async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=after-task-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/after/after-context.js class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new (p_queue_default())(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorageInstance.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorageInstance.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = async_local_storage_bindSnapshot(async ()=>{ try { await afterTaskAsyncStorageInstance.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorageInstance.getStore(); if (!workStore) { throw Object.defineProperty(new lib_invariant_error_InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new lib_invariant_error_InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js /** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.map ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: async_local_storage_createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map ;// ./node_modules/next/dist/esm/server/web/web-on-close.js /** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.map ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js /** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js /** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map ;// ./node_modules/next/dist/esm/server/web/adapter.js class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = tracer_getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm __webpack_require__(720); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = false ? 0 : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: "production" !== 'development', fetchCacheKeyPrefix: "", dev: "production" === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return tracer_getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorageInstance.run(workStore, ()=>workUnitAsyncStorageInstance.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if ( true && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !( false && 0)) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (true) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js const GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; //# sourceMappingURL=url-pattern.js.map ;// ./node_modules/next/dist/esm/server/after/after.js /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map ;// ./node_modules/next/dist/esm/server/after/index.js //# sourceMappingURL=index.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class hooks_server_context_DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class static_generation_bailout_StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ function dynamic_rendering_utils_makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js // This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ class bailout_to_csr_BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js /** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly const hasPostpone = typeof react_react_server.unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return dynamic_rendering_postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if (false) {} break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ function dynamic_rendering_throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ function dynamic_rendering_trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if (false) {} break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport const trackSynchronousRequestDataAccessInDev = (/* unused pure expression or super */ null && (trackSynchronousPlatformIOAccessInDev)); function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; dynamic_rendering_postponeWithTracking(route, reason, dynamicTracking); } function dynamic_rendering_postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return dynamic_rendering_postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = false ? 0 : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map ;// ./node_modules/next/dist/esm/server/request/utils.js function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } function utils_isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/request/connection.js /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if (false) {} else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js // This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; function reflect_utils_describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } const reflect_utils_wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js const actionAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=action-async-storage.external.js.map ;// ./node_modules/next/dist/esm/lib/picocolors.js // 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'); 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; }; }; const picocolors_reset = (/* unused pure expression or super */ null && (enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String)); const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m'); const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m'); const italic = formatter('\x1b[3m', '\x1b[23m'); const underline = formatter('\x1b[4m', '\x1b[24m'); const inverse = formatter('\x1b[7m', '\x1b[27m'); const picocolors_hidden = formatter('\x1b[8m', '\x1b[28m'); const strikethrough = formatter('\x1b[9m', '\x1b[29m'); const black = formatter('\x1b[30m', '\x1b[39m'); const red = formatter('\x1b[31m', '\x1b[39m'); const green = formatter('\x1b[32m', '\x1b[39m'); const yellow = formatter('\x1b[33m', '\x1b[39m'); const blue = formatter('\x1b[34m', '\x1b[39m'); const magenta = formatter('\x1b[35m', '\x1b[39m'); const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m'); const cyan = formatter('\x1b[36m', '\x1b[39m'); const white = formatter('\x1b[37m', '\x1b[39m'); const gray = formatter('\x1b[90m', '\x1b[39m'); const bgBlack = formatter('\x1b[40m', '\x1b[49m'); const bgRed = formatter('\x1b[41m', '\x1b[49m'); const bgGreen = formatter('\x1b[42m', '\x1b[49m'); const bgYellow = formatter('\x1b[43m', '\x1b[49m'); const bgBlue = formatter('\x1b[44m', '\x1b[49m'); const bgMagenta = formatter('\x1b[45m', '\x1b[49m'); const bgCyan = formatter('\x1b[46m', '\x1b[49m'); const bgWhite = formatter('\x1b[47m', '\x1b[49m'); //# sourceMappingURL=picocolors.js.map ;// ./node_modules/next/dist/esm/build/output/log.js const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } function wait(...message) { prefixedLog('wait', ...message); } function error(...message) { prefixedLog('error', ...message); } function warn(...message) { prefixedLog('warn', ...message); } function ready(...message) { prefixedLog('ready', ...message); } function info(...message) { prefixedLog('info', ...message); } function log_event(...message) { prefixedLog('event', ...message); } function log_trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); function log_warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map ;// ./node_modules/next/dist/esm/server/request/root-params.js const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map ;// ./node_modules/next/dist/esm/server/web/exports/index.js // Alias index file of next/server for edge runtime for tree-shaking purpose //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/api/server.js //# sourceMappingURL=server.js.map ;// ./src/middleware.js const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } const config = { matcher: "/api/:path*" }; ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ function http_access_fallback_isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js var redirect_status_code_RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-error.js const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ function redirect_error_isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19! // Import the userland code. const mod = { ...middleware_namespaceObject }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (false) {} const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map {"finalSource":true}mapbufferedMapmappingssourcesContentnamesx;;;;;;;;;;;;;;;;;;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEA,mC;;ACrGO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA,iC;;AC3BO;AACA,6CAA6C;AAC7C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACO;AACA;AACA;AACA;AACP;AACO;AACP;AACA;AACA;AACO;AACP;AACO;AACA,mCAAmC,4DAAY,oBAAoB,CAAC;AAC3E;AACO;AACP;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+NAA+K;AACtN,uCAAuC,qJAAqG;AAC5I,6CAA6C,yIAAyF;AACtI,kCAAkC,wKAAwH;AAC1J,mDAAmD,yJAAyG;AAC5J,kCAAkC,yKAAyH;AAC3J;AACA;AACA,yCAAyC,yJAAyG;AAClJ,oCAAoC,0MAA0J;AAC9L,8BAA8B,mQAAmN;AACjP,kCAAkC,0MAA0J;AAC5L,4BAA4B;AACnC;AACA;AACA;AACA;AACA;AACA,CAAC;AACM;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD,qC;;ACvK+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,yDAAyD;AACzD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN,mEAAmE,YAAY;AAC/E;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA,QAAQ,uBAAuB;AAC/B,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iC;;AChJ8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gHAAgH;AAChH;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,uC;;ACzEO,SAASA,mBACdC,WAAqC,EACrCC,QA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A,KAAQ,OAAfiD,mBAAmBjC,KAAKhB,QAAQ;QAEhD,IAAI,CAACiD,OAAOpE,cAAc,IAAImC,KAAKC,OAAO,EAAE;YAC1CgC,SAASP,QAAQQ,YAAY,GACzBR,QAAQQ,YAAY,CAACC,OAAO,CAACN,wBAC7Bf,mBAAmBA,CAACe,sBAAsBF,KAAKvD,OAAO;YAE1D,IAAI6D,OAAOpE,cAAc,EAAE;gBACzBmC,KAAK1B,MAAM,GAAG2D,OAAOpE,cAAc;YACrC;QACF;IACF;IACA,OAAOmC;AACT;;;AC9GgF;AACiB;AACrC;AAC+B;AAC3F,qGAAqG,EAAE;AACvG;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA,wBAAwB,SAA8C;AACtE;AACA,SAAS;AACT,yBAAyB,WAAW;AACpC,+IAA+I,kBAAkB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;;;ACxL4G;;AAE5G,mC;;ACFsC;AAC4B;AACN;AACjB;AACpC;AACP;AACA;AACA;AACA;AACA,IAAW;AACX,gCAAgC;AAChC;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA;AACA,YAAY,KAAmC,EAAE,EAIxC;AACT;AACA;AACA,4BAA4B,OAAO;AACnC,qBAAqB,yBAAyB;AAC9C;AACA,SAAS;AACT;AACA,yBAAyB,oCAAc;AACvC;AACA,iBAAiB,MAA8C,GAAG,CAAG;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;;AAEA,mC;;AChFO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACnBmE;AAC7B;AAC4B;AACd;AACR;AAC5C,MAAM,kBAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX,+BAA+B;AAC/B;AACA;AACA,4BAA4B,qCAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAs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;;;;;;;;;;;;;;;;;;CAkBC,GACM,SAASC,iBAAiBlG,KAAa;IAC5C,OAAOsF,kBAAkBA,CACvBtF,MAAMN,KAAK,CAAC,KAAKyG,MAAM,CAAC,CAAC3F,UAAUoC,SAASC,OAAOF;QACjD,8BAA8B;QAC9B,IAAI,CAACC,SAAS;YACZ,OAAOpC;QACT;QAEA,sBAAsB;QACtB,IAAI+E,cAAcA,CAAC3C,UAAU;YAC3B,OAAOpC;QACT;QAEA,iCAAiC;QACjC,IAAIoC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOpC;QACT;QAEA,uDAAuD;QACvD,IACGoC,CAAAA,YAAY,UAAUA,YAAY,QAAM,IACzCC,UAAUF,SAASG,MAAM,GAAG,GAC5B;YACA,OAAOtC;QACT;QAEA,OAAUA,WAAS,MAAGoC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACM,SAASwD,gBAAgBvC,GAAW;IACzC,OAAOA,IAAI5D,OAAO,CAChB,eACA;AAGJ;;;AC/D2C;AAC3C;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;AC3KA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2CAAuB;AACvC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+C;;AChDgE;AACzD,iCAAiC,2CAAuB;;AAE/D,uD;;ACHA;AAGE;AACsD;;AAExD,uD;;ACN4C;AACC;AACF;AACwC;AACnF;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,qCAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qCAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,+CAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA,2C;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA,CAAC,iBAAiB;AAClB,IAAI,kBAAQ;AACZ;AACA;AACA,CAAC,CAAC,kBAAQ,MAAM;AAChB;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACsN;;AAEtN,qC;;ACvIA;;;;;CAKC,GACM,SAASoG,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B;;;ACfyE;AACZ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAmC;AACvC,UAAU,mBAAO,CAAC,GAAoB;AACtC,EAAE,KAAK,EAMN;AACD,QAAQ,sEAAsE;AACvE;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B,QAAQ,oFAAoF;AACxK;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAS;AACf;AACA;AACA,CAAC;AAC8C;;AAE/C,kC;;ACvOwE;AACsC;AAC9D;AACE;AAC3C;AACP;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP,oBAAoB,cAAc;AAClC,sCAAsC,2BAA2B;AACjE;AACA,gDAAgD,0CAA0C;AAC1F;AACA;AACA;AACA;AACA;AACO;AACA;AACA,+BAA+B,+DAAe;AAC9C;AACA;AACA,2CAA2C;AAClD;AACA;AACA;AACA,YAAY,YAAY,EAAE,mBAAO,CAAC,GAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW,uBAAuB,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEA,iC;;AC3JuF;AAChF;AACP;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E,wDAAwD,4BAA4B;AACpF;AACA,QAAQ,MAAqC,IAAI,CAA+C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA,+C;;ACnD4E;AACJ;AACmH;AAC3G;AACtB;AACR;AAClD;AACA,oBAAoB,cAAc;AAClC,yBAAyB,cAAc;AACvC;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA,wBAAwB,oCAAc,CAAC,cAAc;AACrD,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,qCAAqC;AACrC;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A,GAAG,0BAAkC;AACrE,MAAMC,8CAA2BA,GAAG,2BAAmC;AACvE,MAAMC,2CAAwBA,GAAG,qBAA6B;AAC9D,MAAMC,+CAA4BA,GAAG,4BAAoC;;;AiBjCzE,MAAMmB,8BAAcA,SAASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;ACRA;AAGE;AACwF;AACxB;AACF;AACzD,SAAS,4DAA2B;AAC3C,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uDAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4D;;;;;AD1LO,MAAMJ,kCAAcA,SAASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;AERA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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Q,cAAK,oBAAoB,cAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,IAAI,cAAK,oBAAoB,cAAK;AAClC;AACA;AACA;;AAEA,oC;;AC1GwD;AACxD,qFAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8C;;ACjEA,MAAM,4DAAwC;AAC9C;AACA;AACA;AACA,CAAC;AACD,MAAM,yCAAqB;AAC3B;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,MAAM,gDAA4B;AAC3B,SAAS,sDAAuB;AACvC,QAAQ,gDAA4B;AACpC,mBAAmB,gDAA4B;AAC/C;AACA,eAAe,yCAAqB;AACpC;AACO,SAAS,gCAAY;AAC5B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA,WAAW,yCAAqB;AAChC;AACO,SAAS,kCAAc;AAC9B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA;AACA;AACA;AACA;;AAEA,+C;;AChDgE;AACzD,sCAAsC,sDAAuB;;AAEpE,6D;;ACHA;AAGE;AAC+B;;AAEjC,6D;;ACNsD;AACY;AACR;AACmB;AACd;AACE;AACqB;AACE;AACjF;AACP,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA,iCAAiC,mBAAY;AAC7C;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAAoB;AAClD;AACA;AACA;AACA,+BAA+B,6BAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAY;AAC5C;AACA,sBAAsB,6BAAqB;AAC3C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAgB;AAC1C;AACA,4CAA4C,kCAAc;AAC1D;AACA;AACA;AACA,aAAa;AACb;AACA,eAAe,sBAAsB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,wDAAwD,kCAAc;AACtE;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,yC;;AC1HA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEA,uC;;AC3BsD;AACqB;AACrB;AACS;AACI;AAC5D,2BAA2B,yEAAyE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kCAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD,eAAe,YAAY;AAC3B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;;AAEA,sC;;AClFA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yDAAyD,UAAU,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wC;;AC5DA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA,kD;;ACZ4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA,mD;;AClBiE;AACF;AACd;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,sCAAsC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B,CAAC,EAAE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B,CAAC,EAAE,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yC;;AC5DA;AACA;AACA,kCAAkC;AAClC,IAAW;AACX;AACA;;AAEA,0C;;ACP6C;AACkC;AACa;AACrC;AACE;AACuC;AAC3D;AACyB;AACY;AAC6F;AAC3G;AACc;AACY;AACxB;AACe;AACY;AACzC;AACQ;AACP;AACc;AACa;AACrB;AACI;AACpD,8BAA8B,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D,YAAY,mBAAO,CAAC,GAA6C;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA,yBAAyB,eAAe;AACxC,gFAAgF,OAAO;AACvF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA,yBAAyB,kBAAkB,oBAAoB,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAA8C,GAAG,CAA2B;AACrG,kDAAkD,oBAAoB;AACtE;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAoB;AAC7C,iCAAiC,EAAyC;AAC1E,iBAAiB,YAAoB;AACrC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,qCAAqC;AACrC;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qFAAqF,wBAAwB;AAC7G,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD,mBAAmB,gBAAS,SAAS,cAAc;AACnD,wCAAwC,gBAAgB,EAAE,yBAAyB;AACnF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D,yCAAyC,wBAAwB;AACjE,sCAAsC,eAAe;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,yBAAyB;AACzB,+DAA+D,2BAA2B;AAC1F;AACA;AACA,qBAAqB;AACrB,iCAAiC,wBAAgB,oBAAoB,4BAAoB;AACzF,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT,YAAY,KAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC,EAAE,gBAAgB;AACzE;AACA;AACA;AACA,UAAU,MAAsD,IAAI,CAA0C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA,qCAAqC,2BAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,oBAAoB;AAC7D,wCAAwC,oBAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,YAAY,IAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA,gDAAgD,YAAY;AAC5D;AACA;AACA;AACA;AACA;AACA,8DAA8D,IAAI;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;;AAEA,mC;;;;AC1WsD;AAC/C;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO,qBAAqB,SAAS;AACrC;AACA;;AAEA,sC;;ACdA;AACA;AAC0C;;AAE1C,uC;;ACJ6E;AAC7E;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY,eAAe;AAC3B;AACA;;AAEA,iC;;ACjBwB;;AAExB,iC;;;;ACFA,MAAMqC,qBAAqB;AAEpB,MAAMC,uCAAkBA,SAAS5D;IAGtCC,YAA4B4D,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCH;IAIpC;AACF;AAEO,SAASI,qBAAqBb,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR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ACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAK,GAAG,yEAAyB,EAAE,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAM;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,EAAE,IAAI,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEP,sC;;AC1DgF;AAC1B;AAC/C;AACP,UAAU,KAAK,CAAC,IAAI;AACpB,WAAW,GAAG,CAAC,IAAI;AACnB,UAAU,MAAM,CAAC,IAAI;AACrB;AACA,UAAU,KAAK,CAAC,IAAI;AACpB,WAAW,KAAK,CAAC,IAAI;AACrB,WAAW,OAAO,CAAC,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO,SAAS,SAAK;AACrB;AACA;AACO,SAAS,SAAK;AACrB;AACA;AACA,0BAA0B,QAAQ;AAC3B,SAAS,YAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA,+B;;ACvEiE;AAIzB;AAIU;AAMK;AACQ;AAMlB;AACmC;AAC/B;AAGjD,MAAMG,eAAe,IAAInR;AAEzB;;CAEC,GACM,eAAeoR;IACpBF,SACE;IAEF,MAAMnD,YAAY/E,iBAAiBwD,QAAQ;IAC3C,IAAI,CAACuB,WAAW;QACd,MAAM,qBAA8D,CAA9D,IAAI5J,eAAe,6CAAnB;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMqG,gBAAgBzB,qBAAqByD,QAAQ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AMC,aAAaV,OAAOd;IAE1B,OACEqB,cAAcH,uBACb3K,CAAAA,SAAS,aAAaA,SAAS,OAAK,IACrC,OAAO+K,gBAAgB,YACvB,CAACG,MAAMD,eACPA,cAAcP;AAElB;;;ACzCoD;AACkB;AAEtE;;;;CAIC,GACM,SAASS,kBACdpN,KAAc;IAEd,OAAO8M,gBAAgB9M,UAAUsM,0BAA0BtM;AAC7D;;;ACfsC;AACiB;AACvD;AACgE;AACiB;AACI;AACrF;AACA,OAAO,0BAAI;AACX;AACA;AACA;AACA;AACA,6DAA6D,KAAK;AAClE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,gBAAgB,KAAqC,EAAE,EAK1C;AACb;AACA;AACA;AACA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACe;AACf,WAAW,OAAO;AAClB;AACA;AACA;AACA,KAAK;AACL;;AAEA`UUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewarePwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middlewarewebpack://../../../../src/shared/lib/i18n/detect-domain-locale.tswebpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.tswebpack://../../../../../src/shared/lib/router/utils/parse-path.tswebpack://../../../../../src/shared/lib/router/utils/add-path-prefix.tswebpack://../../../../../src/shared/lib/router/utils/add-path-suffix.tswebpack://../../../../../src/shared/lib/router/utils/path-has-prefix.tswebpack://../../../../../src/shared/lib/router/utils/add-locale.tswebpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.tswebpack://../../../src/shared/lib/get-hostname.tswebpack://../../../../src/shared/lib/i18n/normalize-locale-path.tswebpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.tswebpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.tsVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middlewaremwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middlewareewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middlewarewebpack://../../../../../src/shared/lib/router/utils/relativize-url.tswebpack://../../../src/client/components/app-router-headers.tsXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middlewarewebpack://../../../../src/shared/lib/page-path/ensure-leading-slash.tswebpack://../../../src/shared/lib/segment.tswebpack://../../../../../src/shared/lib/router/utils/app-paths.tsmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middlewarewebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|sharedwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared!webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shareduwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middlewarewebpack://../../../src/shared/lib/is-thenable.tsZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middlewareYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middlewarekwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middlewareewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middlewarewebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|sharedwebpack://../../../src/shared/lib/invariant-error.ts&webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|sharedWwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middlewarewebpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.tswebpack://../../../../src/server/lib/cache-handlers/default.external.ts\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middlewarevwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middlewarevwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middlewareYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middlewarebwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middlewareZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middlewaregwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middlewaregwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middlewarewebpack://../../../src/client/components/hooks-server-context.tswebpack://../../../src/client/components/static-generation-bailout.tsawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middlewarecwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middlewarewebpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.tswebpack://../../../src/server/app-render/dynamic-rendering.tswebpack://../../../src/server/request/utils.tswebpack://../../../src/server/request/connection.tswebpack://../../../../src/shared/lib/utils/reflect-utils.tswebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|sharedQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middlewarewebpack://../../../src/server/request/root-params.ts[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middlewareMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middlewarewebpack://./src/middleware.jswebpack://../../../../src/client/components/http-access-fallback/http-access-fallback.tswebpack://../../../src/client/components/redirect-status-code.tswebpack://../../../src/client/components/redirect-error.tswebpack://../../../src/client/components/is-next-router-error.tswebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware`Uexport async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } export async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; export function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (process.env.NEXT_RUNTIME !== 'edge') { return; } // The condition is true when the "process" module is provided if (process !== global.process) { // prefer local process but global.process has correct "env" process.env = global.process.env; global.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.mapSexport class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } export class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } export class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; export const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; export const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; export const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; export const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; export const MATCHED_PATH_HEADER = 'x-matched-path'; export const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; export const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; export const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; export const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; export const RSC_SEGMENT_SUFFIX = '.segment.rsc'; export const RSC_SUFFIX = '.rsc'; export const ACTION_SUFFIX = '.action'; export const NEXT_DATA_SUFFIX = '.json'; export const NEXT_META_SUFFIX = '.meta'; export const NEXT_BODY_SUFFIX = '.body'; export const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; export const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; export const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; export const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well export const NEXT_CACHE_TAG_MAX_ITEMS = 128; export const NEXT_CACHE_TAG_MAX_LENGTH = 256; export const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; export const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds export const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. export const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files export const MIDDLEWARE_FILENAME = 'middleware'; export const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`; // Pattern to detect instrumentation hooks file export const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias export const PAGES_DIR_ALIAS = 'private-next-pages'; export const DOT_NEXT_ALIAS = 'private-dot-next'; export const ROOT_DIR_ALIAS = 'private-next-root-dir'; export const APP_DIR_ALIAS = 'private-next-app-dir'; export const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; export const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; export const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; export const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; export const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; export const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; export const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`; export const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`; export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`; export const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`; export const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`; export const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`; export const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; export const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; export const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.'; export const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`; export const NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`; export const SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`; export const ESLINT_DEFAULT_DIRS = [ 'app', 'pages', 'components', 'lib', 'src' ]; export const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; export { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }; //# sourceMappingURL=constants.js.mapimport { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants'; /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ export function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ export function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ export function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ export function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map import { PageSignatureError } from '../error'; const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } export function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } export class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.mapimport type { DomainLocale } from '../../../server/config-shared' export function detectDomainLocale( domainItems?: readonly DomainLocale[], hostname?: string, detectedLocale?: string ) { if (!domainItems) return if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase() } for (const item of domainItems) { // remove port if present const domainHostname = item.domain?.split(':', 1)[0].toLowerCase() if ( hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale) ) { return item } } } /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route: string) { return route.replace(/\/$/, '') || '/' } /** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path: string) { const hashIndex = path.indexOf('#') const queryIndex = path.indexOf('?') const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex) if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '', } } return { pathname: path, query: '', hash: '' } } import { parsePath } from './parse-path' /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path: string, prefix?: string) { if (!path.startsWith('/') || !prefix) { return path } const { pathname, query, hash } = parsePath(path) return `${prefix}${pathname}${query}${hash}` } import { parsePath } from './parse-path' /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path: string, suffix?: string) { if (!path.startsWith('/') || !suffix) { return path } const { pathname, query, hash } = parsePath(path) return `${pathname}${suffix}${query}${hash}` } )import { parsePath } from './parse-path' /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path: string, prefix: string) { if (typeof path !== 'string') { return false } const { pathname } = parsePath(path) return pathname === prefix || pathname.startsWith(prefix + '/') } import { addPathPrefix } from './add-path-prefix' import { pathHasPrefix } from './path-has-prefix' /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale( path: string, locale?: string | false, defaultLocale?: string, ignorePrefix?: boolean ) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path const lower = path.toLowerCase() // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path } // Add the locale prefix to the path. return addPathPrefix(path, `/${locale}`) } +import type { NextPathnameInfo } from './get-next-pathname-info' import { removeTrailingSlash } from './remove-trailing-slash' import { addPathPrefix } from './add-path-prefix' import { addPathSuffix } from './add-path-suffix' import { addLocale } from './add-locale' interface ExtendedInfo extends NextPathnameInfo { defaultLocale?: string ignorePrefix?: boolean } export function formatNextPathnameInfo(info: ExtendedInfo) { let pathname = addLocale( info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix ) if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname) } if (info.buildId) { pathname = addPathSuffix( addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json' ) } pathname = addPathPrefix(pathname, info.basePath) return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname) } import type { OutgoingHttpHeaders } from 'http' /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname( parsed: { hostname?: string | null }, headers?: OutgoingHttpHeaders ): string | undefined { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname: string if (headers?.host && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0] } else if (parsed.hostname) { hostname = parsed.hostname } else return return hostname.toLowerCase() } export interface PathLocale { detectedLocale?: string pathname: string } /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap() /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath( pathname: string, locales?: readonly string[] ): PathLocale { // If locales is undefined, return the pathname as is. if (!locales) return { pathname } // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales) if (!lowercasedLocales) { lowercasedLocales = locales.map((locale) => locale.toLowerCase()) cache.set(locales, lowercasedLocales) } let detectedLocale: string | undefined // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2) // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname } // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase() // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment) if (index < 0) return { pathname } // Return the case-sensitive locale. detectedLocale = locales[index] // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/' return { pathname, detectedLocale } } import { pathHasPrefix } from './path-has-prefix' /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path: string, prefix: string): string { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length) // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return `/${withoutPrefix}` } [ import { normalizeLocalePath } from '../../i18n/normalize-locale-path' import { removePathPrefix } from './remove-path-prefix' import { pathHasPrefix } from './path-has-prefix' import type { I18NProvider } from '../../../../server/lib/i18n-provider' export interface NextPathnameInfo { /** * The base path in case the pathname included it. */ basePath?: string /** * The buildId for when the parsed URL is a data URL. Parsing it can be * disabled with the `parseData` option. */ buildId?: string /** * If there was a locale in the pathname, this will hold its value. */ locale?: string /** * The processed pathname without a base path, locale, or data URL elements * when parsing it is enabled. */ pathname: string /** * A boolean telling if the pathname had a trailingSlash. This can be only * true if trailingSlash is enabled. */ trailingSlash?: boolean } interface Options { /** * When passed to true, this function will also parse Nextjs data URLs. */ parseData?: boolean /** * A partial of the Next.js configuration to parse the URL. */ nextConfig?: { basePath?: string i18n?: { locales?: readonly string[] } | null trailingSlash?: boolean } /** * If provided, this normalizer will be used to detect the locale instead of * the default locale detection. */ i18nProvider?: I18NProvider } export function getNextPathnameInfo( pathname: string, options: Options ): NextPathnameInfo { const { basePath, i18n, trailingSlash } = options.nextConfig ?? {} const info: NextPathnameInfo = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash, } if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath) info.basePath = basePath } let pathnameNoDataPrefix = info.pathname if ( info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json') ) { const paths = info.pathname .replace(/^\/_next\/data\//, '') .replace(/\.json$/, '') .split('/') const buildId = paths[0] info.buildId = buildId pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/' // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales) info.locale = result.detectedLocale info.pathname = result.pathname ?? info.pathname if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales) if (result.detectedLocale) { info.locale = result.detectedLocale } } } return info } import { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'; import { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'; import { getHostname } from '../../shared/lib/get-hostname'; import { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'; const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); export class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.mapexport { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies'; //# sourceMappingURL=cookies.js.map import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { RemovedUAError, RemovedPageError } from '../error'; import { RequestCookies } from './cookies'; export const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ export class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (process.env.NEXT_RUNTIME !== 'edge') { if (init.body && init.duplex !== 'half') { init.duplex = 'half'; } } if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new RequestCookies(this.headers), nextUrl, url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.mapEexport class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map|import { stringifyCookie } from '../../web/spec-extension/cookies'; import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { ReflectAdapter } from './adapters/reflect'; import { ResponseCookies } from './cookies'; const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ export class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.mapG/** * The result of parsing a URL relative to a base URL. */ export type RelativeURL = { /** * The relative URL. Either a URL including the origin or a relative URL. */ url: string /** * Whether the URL is relative to the base URL. */ isRelative: boolean } export function parseRelativeURL( url: string | URL, base: string | URL ): RelativeURL { const baseURL = typeof base === 'string' ? new URL(base) : base const relative = new URL(url, base) // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative, } } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url: string | URL, base: string | URL): string { const relative = parseRelativeURL(url, base) return relative.url } export const RSC_HEADER = 'rsc' as const export const ACTION_HEADER = 'next-action' as const // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch' as const export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const export const NEXT_URL = 'next-url' as const export const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, ] as const export const NEXT_RSC_UNION_QUERY = '_rsc' as const export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const Bimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'; const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; export function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } export function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path: string) { return path.startsWith('/') ? path : `/${path}` } @import type { Segment } from '../../server/app-render/types' export function isGroupSegment(segment: string) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')') } export function isParallelRouteSegment(segment: string) { return segment.startsWith('@') && segment !== '@children' } export function addSearchParamsIfPageSegment( segment: Segment, searchParams: Record ) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY) if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams) return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY } return segment } export const PAGE_SEGMENT_KEY = '__PAGE__' export const DEFAULT_SEGMENT_KEY = '__DEFAULT__' import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash' import { isGroupSegment } from '../../segment' /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route: string) { return ensureLeadingSlash( route.split('/').reduce((pathname, segment, index, segments) => { // Empty segments are ignored. if (!segment) { return pathname } // Groups are ignored. if (isGroupSegment(segment)) { return pathname } // Parallel segments are ignored. if (segment[0] === '@') { return pathname } // The last segment (if it's a leaf) should be ignored. if ( (segment === 'page' || segment === 'route') && index === segments.length - 1 ) { return pathname } return `${pathname}/${segment}` }, '') ) } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url: string) { return url.replace( /\.rsc($|\?)/, // $1 ensures `?` is preserved '$1' ) } Jimport { ReflectAdapter } from './reflect'; /** * @internal */ export class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } export class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.mapconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const workAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map$// Share the instance module in the next-shared layer import { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { workAsyncStorageInstance as workAsyncStorage }; //# sourceMappingURL=work-async-storage.external.js.mapimport { RequestCookies } from '../cookies'; import { ResponseCookies } from '../cookies'; import { ReflectAdapter } from './reflect'; import { workAsyncStorage } from '../../../app-render/work-async-storage.external'; /** * @internal */ export class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } export class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); export function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } export function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } export class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorage.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } export function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } export function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } export function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.mapY/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user export const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set export const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); export { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, }; //# sourceMappingURL=constants.js.mapr/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable( promise: Promise | T ): promise is Promise { return ( promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function' ) } $import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'; import { isThenable } from '../../../shared/lib/is-thenable'; const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (process.env.NEXT_RUNTIME === 'edge') { api = require('@opentelemetry/api'); } else { try { api = require('@opentelemetry/api'); } catch (err) { api = require('next/dist/compiled/@opentelemetry/api'); } } const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; export class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } export function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); export { getTracer, SpanStatusCode, SpanKind }; //# sourceMappingURL=tracer.js.mapimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants'; import { getTracer } from '../lib/trace/tracer'; import { NodeSpan } from '../lib/trace/constants'; export function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ export function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ export function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } export function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } export const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; export const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; export const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; export const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); export const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); export function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = require('next/dist/compiled/cookie'); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ export class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ export function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ export function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils'; export class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id')); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.mapimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'; import { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies'; import { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'; import { DraftModeProvider } from './draft-mode-provider'; import { splitCookiesString } from '../web/utils'; function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } export function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } export function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } export function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const workUnitAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.map export class InvariantError extends Error { constructor(message: string, options?: ErrorOptions) { super( `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`, options ) this.name = 'InvariantError' } } // Share the instance module in the next-shared layer import { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; import { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'; import { InvariantError } from '../../shared/lib/invariant-error'; export { workUnitAsyncStorageInstance as workUnitAsyncStorage }; export function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } export function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } export function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } export function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } export function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } export function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } export function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ export class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.mapimport type { Timestamp } from '../cache-handlers/types' // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map() export const isStale = (tags: string[], timestamp: Timestamp) => { for (const tag of tags) { const revalidatedAt = tagsManifest.get(tag) if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true } } return false } */** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache' import type { CacheEntry, CacheHandlerV2 } from './types' import { isStale, tagsManifest, } from '../incremental-cache/tags-manifest.external' type PrivateCacheEntry = { entry: CacheEntry // For the default cache we store errored cache // entries and allow them to be used up to 3 times // after that we want to dispose it and try for fresh // If an entry is errored we return no entry // three times so that we retry hitting origin (MISS) // and then if it still fails to set after the third we // return the errored content and use expiration of // Math.min(30, entry.expiration) isErrored: boolean errorRetryCount: number // compute size on set since we need to read size // of the ReadableStream for LRU evicting size: number } // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache( 50 * 1024 * 1024, (entry) => entry.size ) const pendingSets = new Map>() const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined const DefaultCacheHandler: CacheHandlerV2 = { async get(cacheKey) { const pendingPromise = pendingSets.get(cacheKey) if (pendingPromise) { debug?.('get', cacheKey, 'pending') await pendingPromise } const privateEntry = memoryCache.get(cacheKey) if (!privateEntry) { debug?.('get', cacheKey, 'not found') return undefined } const entry = privateEntry.entry if ( performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000 ) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug?.('get', cacheKey, 'expired') return undefined } if (isStale(entry.tags, entry.timestamp)) { debug?.('get', cacheKey, 'had stale tag') return undefined } const [returnStream, newSaved] = entry.value.tee() entry.value = newSaved debug?.('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire, }) return { ...entry, value: returnStream, } }, async set(cacheKey, pendingEntry) { debug?.('set', cacheKey, 'start') let resolvePending: () => void = () => {} const pendingPromise = new Promise((resolve) => { resolvePending = resolve }) pendingSets.set(cacheKey, pendingPromise) const entry = await pendingEntry let size = 0 try { const [value, clonedValue] = entry.value.tee() entry.value = value const reader = clonedValue.getReader() for (let chunk; !(chunk = await reader.read()).done; ) { size += Buffer.from(chunk.value).byteLength } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size, }) debug?.('set', cacheKey, 'done') } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug?.('set', cacheKey, 'failed', err) } finally { resolvePending() pendingSets.delete(cacheKey) } }, async refreshTags() { // Nothing to do for an in-memory cache handler. }, async getExpiration(...tags) { const expiration = Math.max( ...tags.map((tag) => tagsManifest.get(tag) ?? 0) ) debug?.('getExpiration', { tags, expiration }) return expiration }, async expireTags(...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()) debug?.('expireTags', { tags, timestamp }) for (const tag of tags) { // TODO: update file-system-cache? tagsManifest.set(tag, timestamp) } }, } export default DefaultCacheHandler import DefaultCacheHandler from '../lib/cache-handlers/default.external'; const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ export function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ export function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ export function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ export function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ export function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.mape import { getCacheHandlers } from './use-cache/handlers'; /** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } export async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const afterTaskAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.map7// Share the instance module in the next-shared layer import { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { afterTaskAsyncStorage }; //# sourceMappingURL=after-task-async-storage.external.js.mapimport PromiseQueue from 'next/dist/compiled/p-queue'; import { InvariantError } from '../../shared/lib/invariant-error'; import { isThenable } from '../../shared/lib/is-thenable'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { withExecuteRevalidates } from '../revalidation-utils'; import { bindSnapshot } from '../app-render/async-local-storage'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new PromiseQueue(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorage.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorage.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = bindSnapshot(async ()=>{ try { await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ export function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } export function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.mapimport { AfterContext } from '../after/after-context'; import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { createLazyResult } from '../lib/lazy-result'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createSnapshot } from '../app-render/async-local-storage'; export function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ export function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } export function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } export class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.mapF/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ export function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.mapRimport { createAsyncLocalStorage } from '../app-render/async-local-storage'; export function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ export function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ export function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map Fimport { PageSignatureError } from './error'; import { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'; import { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event'; import { NextRequest } from './spec-extension/request'; import { NextResponse } from './spec-extension/response'; import { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url'; import { NextURL } from './next-url'; import { stripInternalSearchParams } from '../internal-utils'; import { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'; import { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers'; import { ensureInstrumentationRegistered } from './globals'; import { createRequestStoreForAPI } from '../async-storage/request-store'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { createWorkStore } from '../async-storage/work-store'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'; import { getTracer } from '../lib/trace/tracer'; import { MiddlewareSpan } from '../lib/trace/constants'; import { CloseController } from './web-on-close'; import { getEdgePreviewProps } from './get-edge-preview-props'; import { getBuiltinRequestContext } from '../after/builtin-request-context'; import { getImplicitTags } from '../lib/implicit-tags'; import { isRSCRequestHeader } from '../lib/is-rsc-request'; export class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm require('next/dist/experimental/testmode/server-edge'); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } export async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: process.env.NODE_ENV !== 'development', fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX, dev: process.env.NODE_ENV === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\/\//))) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map import parseua from 'next/dist/compiled/ua-parser-js'; export function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } export function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } export function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.mapconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; export { GlobalURLPattern as URLPattern }; //# sourceMappingURL=url-pattern.js.map)import { workAsyncStorage } from '../app-render/work-async-storage.external'; /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ export function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map;export * from './after'; //# sourceMappingURL=index.js.mapconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE' export class DynamicServerError extends Error { digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE constructor(public readonly description: string) { super(`Dynamic server usage: ${description}`) } } export function isDynamicServerError(err: unknown): err is DynamicServerError { if ( typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string' ) { return false } return err.digest === DYNAMIC_ERROR_CODE } const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT' export class StaticGenBailoutError extends Error { public readonly code = NEXT_STATIC_GEN_BAILOUT } export function isStaticGenBailoutError( error: unknown ): error is StaticGenBailoutError { if (typeof error !== 'object' || error === null || !('code' in error)) { return false } return error.code === NEXT_STATIC_GEN_BAILOUT }  export function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ export function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} export function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.mapAexport const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; export const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; export const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; export const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING' /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { public readonly digest = BAILOUT_TO_CSR constructor(public readonly reason: string) { super(`Bail out to client-side rendering: ${reason}`) } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err: unknown): err is BailoutToCSRError { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false } return err.digest === BAILOUT_TO_CSR } x/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ import type { WorkStore } from '../app-render/work-async-storage.external' import type { WorkUnitStore, RequestStore, PrerenderStoreLegacy, PrerenderStoreModern, PrerenderStoreModernRuntime, } from '../app-render/work-unit-async-storage.external' // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react' import { DynamicServerError } from '../../client/components/hooks-server-context' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { getRuntimeStagePromise, workUnitAsyncStorage, } from './work-unit-async-storage.external' import { workAsyncStorage } from '../app-render/work-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME, } from '../../lib/framework/boundary-constants' import { scheduleOnNextTick } from '../../lib/scheduler' import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr' import { InvariantError } from '../../shared/lib/invariant-error' const hasPostpone = typeof React.unstable_postpone === 'function' export type DynamicAccess = { /** * If debugging, this will contain the stack trace of where the dynamic access * occurred. This is used to provide more information to the user about why * their page is being rendered dynamically. */ stack?: string /** * The expression that was accessed dynamically. */ expression: string } // Stores dynamic reasons used during an RSC render. export type DynamicTrackingState = { /** * When true, stack information will also be tracked during dynamic access. */ readonly isDebugDynamicAccesses: boolean | undefined /** * The dynamic accesses that occurred during the render. */ readonly dynamicAccesses: Array syncDynamicErrorWithStack: null | Error } // Stores dynamic reasons used during an SSR render. export type DynamicValidationState = { hasSuspenseAboveBody: boolean hasDynamicMetadata: boolean hasDynamicViewport: boolean hasAllowedDynamic: boolean dynamicErrors: Array } export function createDynamicTrackingState( isDebugDynamicAccesses: boolean | undefined ): DynamicTrackingState { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null, } } export function createDynamicValidationState(): DynamicValidationState { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [], } } export function getFirstDynamicReason( trackingState: DynamicTrackingState ): undefined | string { return trackingState.dynamicAccesses[0]?.expression } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic( store: WorkStore, workUnitStore: undefined | Exclude, expression: string ): void { if (workUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender-legacy': case 'prerender-ppr': case 'request': break default: workUnitStore satisfies never } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return if (store.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'prerender-ppr': return postponeWithTracking( store.route, expression, workUnitStore.dynamicTracking ) case 'prerender-legacy': workUnitStore.revalidate = 0 // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration( expression: string, store: WorkStore, prerenderStore: PrerenderStoreLegacy ): never { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) prerenderStore.revalidate = 0 store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } function abortOnSynchronousDynamicDataAccess( route: string, expression: string, prerenderStore: PrerenderStoreModern ): void { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` const error = createPrerenderInterruptedError(reason) prerenderStore.controller.abort(error) const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function abortOnSynchronousPlatformIOAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): void { const dynamicTracking = prerenderStore.dynamicTracking abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } export function trackSynchronousPlatformIOAccessInDev( requestStore: RequestStore ): void { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): never { const prerenderSignal = prerenderStore.controller.signal if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } throw createPrerenderInterruptedError( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` ) } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack) } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev /** * This component will call `React.postpone` that throws the postponed error. */ type PostponeProps = { reason: string route: string } export function Postpone({ reason, route }: PostponeProps): never { const prerenderStore = workUnitAsyncStorage.getStore() const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null postponeWithTracking(route, reason, dynamicTracking) } export function postponeWithTracking( route: string, expression: string, dynamicTracking: null | DynamicTrackingState ): never { assertPostpone() if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } React.unstable_postpone(createPostponeReason(route, expression)) } function createPostponeReason(route: string, expression: string) { return ( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error` ) } export function isDynamicPostpone(err: unknown) { if ( typeof err === 'object' && err !== null && typeof (err as any).message === 'string' ) { return isDynamicPostponeReason((err as any).message) } return false } function isDynamicPostponeReason(reason: string) { return ( reason.includes( 'needs to bail out of prerendering at this point because it used' ) && reason.includes( 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error' ) ) } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw new Error( 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js' ) } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED' function createPrerenderInterruptedError(message: string): Error { const error = new Error(message) ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED return error } type DigestError = Error & { digest: string } export function isPrerenderInterruptedError( error: unknown ): error is DigestError { return ( typeof error === 'object' && error !== null && (error as any).digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error ) } export function accessedDynamicData( dynamicAccesses: Array ): boolean { return dynamicAccesses.length > 0 } export function consumeDynamicAccess( serverDynamic: DynamicTrackingState, clientDynamic: DynamicTrackingState ): DynamicTrackingState['dynamicAccesses'] { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses) return serverDynamic.dynamicAccesses } export function formatDynamicAPIAccesses( dynamicAccesses: Array ): string[] { return dynamicAccesses .filter( (access): access is Required => typeof access.stack === 'string' && access.stack.length > 0 ) .map(({ expression, stack }) => { stack = stack .split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4) .filter((line) => { // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false } return true }) .join('\n') return `Dynamic API Usage Debug - ${expression}:\n${stack}` }) } function assertPostpone() { if (!hasPostpone) { throw new Error( `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js` ) } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal(): AbortSignal { const controller = new AbortController() controller.abort(new BailoutToCSRError('Render in Browser')) return controller.signal } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal( workUnitStore: WorkUnitStore ): AbortSignal | undefined { switch (workUnitStore.type) { case 'prerender': case 'prerender-runtime': const controller = new AbortController() if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(() => { controller.abort() }) } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore) if (runtimeStagePromise) { runtimeStagePromise.then(() => scheduleOnNextTick(() => controller.abort()) ) } else { scheduleOnNextTick(() => controller.abort()) } } return controller.signal case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined default: workUnitStore satisfies never } } export function annotateDynamicAccess( expression: string, prerenderStore: PrerenderStoreModern ) { const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function useDynamicRouteParams(expression: string) { const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore && workUnitStore) { switch (workUnitStore.type) { case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use( makeHangingPromise( workUnitStore.renderSignal, workStore.route, expression ) ) } break } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking( workStore.route, expression, workUnitStore.dynamicTracking ) } break } case 'prerender-runtime': throw new InvariantError( `\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'cache': case 'private-cache': throw new InvariantError( `\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'prerender-legacy': case 'request': case 'unstable-cache': break default: workUnitStore satisfies never } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/ // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6' // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp( `\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)` ) const hasMetadataRegex = new RegExp( `\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]` ) const hasViewportRegex = new RegExp( `\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]` ) const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`) export function trackAllowedDynamicAccess( workStore: WorkStore, componentStack: string, dynamicValidation: DynamicValidationState, clientDynamic: DynamicTrackingState ) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true return } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true return } else if ( hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test( componentStack ) ) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true dynamicValidation.hasSuspenseAboveBody = true return } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true return } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push( clientDynamic.syncDynamicErrorWithStack ) return } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense` const error = createErrorWithComponentOrOwnerStack(message, componentStack) dynamicValidation.dynamicErrors.push(error) return } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack( message: string, componentStack: string ) { const ownerStack = process.env.NODE_ENV !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null const error = new Error(message) error.stack = error.name + ': ' + message + (ownerStack ?? componentStack) return error } export enum PreludeState { Full = 0, Empty = 1, Errored = 2, } export function logDisallowedDynamicError( workStore: WorkStore, error: Error ): void { console.error(error) if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error( `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.` ) } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`) } } } export function throwIfDisallowedDynamic( workStore: WorkStore, prelude: PreludeState, dynamicValidation: DynamicValidationState, serverDynamic: DynamicTrackingState ): void { if (prelude !== PreludeState.Full) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError( workStore, serverDynamic.syncDynamicErrorWithStack ) throw new StaticGenBailoutError() } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors if (dynamicErrors.length > 0) { for (let i = 0; i < dynamicErrors.length; i++) { logDisallowedDynamicError(workStore, dynamicErrors[i]) } throw new StaticGenBailoutError() } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error( `Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport` ) throw new StaticGenBailoutError() } if (prelude === PreludeState.Empty) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error( `Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.` ) throw new StaticGenBailoutError() } } else { if ( dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata ) { console.error( `Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata` ) throw new StaticGenBailoutError() } } } export function delayUntilRuntimeStage( prerenderStore: PrerenderStoreModernRuntime, result: Promise ): Promise { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(() => result) } return result } ,import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external' import type { WorkStore } from '../app-render/work-async-storage.external' export function throwWithStaticGenerationBailoutError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwWithStaticGenerationBailoutErrorWithDynamicError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwForSearchParamsAccessInUseCache( workStore: WorkStore, constructorOpt: Function ): never { const error = new Error( `Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, constructorOpt) workStore.invalidDynamicUsageError ??= error throw error } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore() return afterTaskStore?.rootTaskSpawnPhase === 'action' } ]import { workAsyncStorage } from '../app-render/work-async-storage.external' import { throwForMissingRequestStore, workUnitAsyncStorage, } from '../app-render/work-unit-async-storage.external' import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender, } from '../app-render/dynamic-rendering' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { makeHangingPromise, makeDevtoolsIOAwarePromise, } from '../dynamic-rendering-utils' import { isRequestAPICallableInsideAfter } from './utils' /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection(): Promise { const callingExpression = 'connection' const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore) { if ( workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter() ) { throw new Error( `Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after` ) } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined) } if (workStore.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'cache': { const error = new Error( `Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = new Error( `Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'unstable-cache': throw new Error( `Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache` ) case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise( workUnitStore.renderSignal, workStore.route, '`connection()`' ) case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking( workStore.route, 'connection', workUnitStore.dynamicTracking ) case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration( 'connection', workStore, workUnitStore ) case 'request': trackDynamicDataInDynamicRender(workUnitStore) if (process.env.NODE_ENV === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined) } else { return Promise.resolve(undefined) } default: workUnitStore satisfies never } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression) } h// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/ export function describeStringPropertyAccess(target: string, prop: string) { if (isDefinitelyAValidIdentifier.test(prop)) { return `\`${target}.${prop}\`` } return `\`${target}[${JSON.stringify(prop)}]\`` } export function describeHasCheckingStringProperty( target: string, prop: string ) { const stringifiedProp = JSON.stringify(prop) return `\`Reflect.has(${target}, ${stringifiedProp})\`, \`${stringifiedProp} in ${target}\`, or similar` } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule', ]) import { createAsyncLocalStorage } from './async-local-storage'; export const actionAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.map.// Share the instance module in the next-shared layer import { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { actionAsyncStorageInstance as actionAsyncStorage }; //# sourceMappingURL=action-async-storage.external.js.map, // 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'); 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 import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'; import { LRUCache } from '../../server/lib/lru-cache'; export const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } export function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } export function wait(...message) { prefixedLog('wait', ...message); } export function error(...message) { prefixedLog('error', ...message); } export function warn(...message) { prefixedLog('warn', ...message); } export function ready(...message) { prefixedLog('ready', ...message); } export function info(...message) { prefixedLog('info', ...message); } export function event(...message) { prefixedLog('event', ...message); } export function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); export function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map.import { InvariantError } from '../../shared/lib/invariant-error' import { postponeWithTracking, throwToInterruptStaticGeneration, } from '../app-render/dynamic-rendering' import { workAsyncStorage, type WorkStore, } from '../app-render/work-async-storage.external' import { workUnitAsyncStorage, type PrerenderStoreLegacy, type PrerenderStorePPR, type StaticPrerenderStore, } from '../app-render/work-unit-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import type { FallbackRouteParams } from './fallback-params' import type { Params, ParamValue } from './params' import { describeStringPropertyAccess, wellKnownProperties, } from '../../shared/lib/utils/reflect-utils' import { actionAsyncStorage } from '../app-render/action-async-storage.external' import { warnOnce } from '../../build/output/log' interface CacheLifetime {} const CachedParams = new WeakMap>() /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams(): Promise { warnOnce( '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.' ) const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError('Missing workStore in unstable_rootParams') } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.` ) } switch (workUnitStore.type) { case 'cache': case 'unstable-cache': { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams( workUnitStore.rootParams, workStore, workUnitStore ) case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams) default: return workUnitStore satisfies never } } function createPrerenderRootParams( underlyingParams: Params, workStore: WorkStore, prerenderStore: StaticPrerenderStore ): Promise { switch (prerenderStore.type) { case 'prerender-client': { const exportName = '`unstable_rootParams`' throw new InvariantError( `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.` ) } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const promise = makeHangingPromise( prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`' ) CachedParams.set(underlyingParams, promise) return promise } } } break } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams( underlyingParams, fallbackParams, workStore, prerenderStore ) } } } break } case 'prerender-legacy': break default: prerenderStore satisfies never } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams) } function makeErroringRootParams( underlyingParams: Params, fallbackParams: FallbackRouteParams, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy ): Promise { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const augmentedUnderlying = { ...underlyingParams } // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying) CachedParams.set(underlyingParams, promise) Object.keys(underlyingParams).forEach((prop) => { if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get() { const expression = describeStringPropertyAccess( 'unstable_rootParams', prop ) // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } else { // Legacy Prerender throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } }, enumerable: true, }) } else { ;(promise as any)[prop] = underlyingParams[prop] } } }) return promise } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName: string): Promise { const apiName = `\`import('next/root-params').${paramName}()\`` const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError(`Missing workStore in ${apiName}`) } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.` ) } const actionStore = actionAsyncStorage.getStore() if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw new Error( `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.` ) } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw new Error( `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.` ) } } switch (workUnitStore.type) { case 'unstable-cache': case 'cache': { throw new Error( `Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise( paramName, workStore, workUnitStore, apiName ) } case 'private-cache': case 'prerender-runtime': case 'request': { break } default: { workUnitStore satisfies never } } return Promise.resolve(workUnitStore.rootParams[paramName]) } function createPrerenderRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: StaticPrerenderStore, apiName: string ): Promise { switch (prerenderStore.type) { case 'prerender-client': { throw new InvariantError( `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.` ) } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams switch (prerenderStore.type) { case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeHangingPromise( prerenderStore.renderSignal, workStore.route, apiName ) } break } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeErroringRootParamPromise( paramName, workStore, prerenderStore, apiName ) } break } case 'prerender-legacy': { // legacy prerenders can't have fallback params break } default: { prerenderStore satisfies never } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]) } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy, apiName: string ): Promise { const expression = describeStringPropertyAccess(apiName, paramName) // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch (prerenderStore.type) { case 'prerender-ppr': { return postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } case 'prerender-legacy': { return throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } default: { prerenderStore satisfies never } } } M// Alias index file of next/server for edge runtime for tree-shaking purpose export { ImageResponse } from '../spec-extension/image-response'; export { NextRequest } from '../spec-extension/request'; export { NextResponse } from '../spec-extension/response'; export { userAgent, userAgentFromString } from '../spec-extension/user-agent'; export { URLPattern } from '../spec-extension/url-pattern'; export { after } from '../../after'; export { connection } from '../../request/connection'; export { unstable_rootParams } from '../../request/root-params'; //# sourceMappingURL=index.js.mapPexport * from '../server/web/exports/index'; //# sourceMappingURL=server.js.mapLimport { NextResponse } from "next/server"; const WINDOW_MS = 60_000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter(t => now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401, } const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)) export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK' export type HTTPAccessFallbackError = Error & { digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}` } /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError( error: unknown ): error is HTTPAccessFallbackError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const [prefix, httpStatus] = error.digest.split(';') return ( prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)) ) } export function getAccessFallbackHTTPStatus( error: HTTPAccessFallbackError ): number { const httpStatus = error.digest.split(';')[1] return Number(httpStatus) } export function getAccessFallbackErrorTypeByStatus( status: number ): 'not-found' | 'forbidden' | 'unauthorized' | undefined { switch (status) { case 401: return 'unauthorized' case 403: return 'forbidden' case 404: return 'not-found' default: return } } kexport enum RedirectStatusCode { SeeOther = 303, TemporaryRedirect = 307, PermanentRedirect = 308, } import { RedirectStatusCode } from './redirect-status-code' export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT' export enum RedirectType { push = 'push', replace = 'replace', } export type RedirectError = Error & { digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};` } /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error: unknown): error is RedirectError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const digest = error.digest.split(';') const [errorCode, type] = digest const destination = digest.slice(2, -2).join(';') const status = digest.at(-2) const statusCode = Number(status) return ( errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode ) } "import { isHTTPAccessFallbackError, type HTTPAccessFallbackError, } from './http-access-fallback/http-access-fallback' import { isRedirectError, type RedirectError } from './redirect-error' /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError( error: unknown ): error is RedirectError | HTTPAccessFallbackError { return isRedirectError(error) || isHTTPAccessFallbackError(error) } import "next/dist/server/web/globals"; import { adapter } from "next/dist/server/web/adapter"; // Import the userland code. import * as _mod from "private-next-root-dir/src/middleware.js"; import { edgeInstrumentationOnRequestError } from "next/dist/server/web/globals"; import { isNextRouterError } from "next/dist/client/components/is-next-router-error"; const mod = { ..._mod }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (process.env.NODE_ENV !== 'production') { if (isNextRouterError(err)) { err.message = `Next.js navigation API is not allowed to be used in Middleware.`; throw err; } } const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } export default function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map @detectDomainLocaledomainItemshostnamedetectedLocaletoLowerCaseitemdomainHostnamedomainsplitdefaultLocalelocalessomelocaleremoveTrailingSlashroutereplaceparsePathhashIndexindexOfqueryIndexhasQuerypathnamesubstringundefinedMsliceaddPathPrefixprefixstartsWithaddPathSuffixsuffixpathHasPrefixaddLocaleignorePrefixlowerformatNextPathnameInfoinfobuildIdtrailingSlashbasePathendsWithgetHostnameheadershostArrayisArraytoStringcacheWeakMapnormalizeLocalePathlowercasedLocalesgetsetsegmentssegmentindexlengthremovePathPrefixwithoutPrefixgetNextPathnameInfooptionsi18nnextConfigpathnameNoDataPrefixpathsjoinparseDataresulti18nProvideranalyzeparseRelativeURLurlbasebaseURLURLrelativeisRelativeorigingetRelativeURLRSC_HEADERACTION_HEADERNEXT_ROUTER_STATE_TREE_HEADERNEXT_ROUTER_PREFETCH_HEADERNEXT_ROUTER_SEGMENT_PREFETCH_HEADERNEXT_HMR_REFRESH_HEADERNEXT_HMR_REFRESH_HASH_COOKIENEXT_URLRSC_CONTENT_TYPE_HEADERFLIGHT_HEADERSNEXT_RSC_UNION_QUERYNEXT_ROUTER_STALE_TIME_HEADERNEXT_DID_POSTPONE_HEADERNEXT_REWRITTEN_PATH_HEADERNEXT_REWRITTEN_QUERY_HEADERNEXT_IS_PRERENDER_HEADERNEXT_ACTION_NOT_FOUND_HEADERensureLeadingSlashisGroupSegmentisParallelRouteSegmentaddSearchParamsIfPageSegmentsearchParamsisPageSegmentincludesPAGE_SEGMENT_KEYstringifiedQueryJSONstringifyDEFAULT_SEGMENT_KEYnormalizeAppPathreducenormalizeRscURLisThenablepromisethenInvariantErrorErrorconstructormessagetagsManifestMapisStaletagstagrevalidatedAtLRUCachememoryCacheentrypendingSetsdebugXenvNEXT_PRIVATE_DEBUG_CACHEconsolebindDefaultCacheHandlercacheKeypendingPromiseprivateEntryperformancetimeOriginnowrevalidatereturnStreamnewSavedvalueteeexpirependingEntryresolvePendingPromiseresolveclonedValuereadergetReaderchunkreaddoneBufferfrombyteLengthisErrorederrorRetryCounterrdeleterefreshTagsgetExpirationexpirationMathmaxexpireTagsroundDYNAMIC_ERROR_CODEDynamicServerErroridigestisDynamicServerErrorNEXT_STATIC_GEN_BAILOUTStaticGenBailoutErrorcodeisStaticGenBailoutErrorerrorBAILOUT_TO_CSRBailoutToCSRErrorreasonisBailoutToCSRErrorReactgetRuntimeStagePromiseworkUnitAsyncStorageworkAsyncStoragemakeHangingPromiseMETADATA_BOUNDARY_NAMEVIEWPORT_BOUNDARY_NAMEOUTLET_BOUNDARY_NAMEROOT_LAYOUT_BOUNDARY_NAMEscheduleOnNextTickhasPostponeunstable_postponecreateDynamicTrackingStateisDebugDynamicAccessesdynamicAccessessyncDynamicErrorWithStackcreateDynamicValidationStatehasSuspenseAboveBodyhasDynamicMetadatahasDynamicViewporthasAllowedDynamicdynamicErrorsgetFirstDynamicReasontrackingStateexpressionmarkCurrentScopeAsDynamicstoreworkUnitStore!forceDynamicforceStaticdynamicShouldErrorpostponeWithTrackingdynamicTrackingdynamicUsageDescriptiondynamicUsageStackstackNODE_ENVusedDynamicthrowToInterruptStaticGenerationprerenderStoretrackDynamicDataInDynamicRenderabortOnSynchronousDynamicDataAccesscreatePrerenderInterruptedErrorcontrollerabortpushabortOnSynchronousPlatformIOAccesserrorWithStacktrackSynchronousPlatformIOAccessInDevrequestStoreprerenderPhaseabortAndThrowOnSynchronousRequestDataAccessprerenderSignalsignalabortedwarnOnSyncDynamicErrortrackSynchronousRequestDataAccessInDevPostponegetStoreassertPostponecreatePostponeReasonisDynamicPostponeisDynamicPostponeReasonNEXT_PRERENDER_INTERRUPTEDisPrerenderInterruptedErroraccessedDynamicDataconsumeDynamicAccessserverDynamicclientDynamicformatDynamicAPIAccessesfilteraccesscreateRenderInBrowserAbortSignalAbortControllercreateHangingInputAbortSignalcacheSignalinputReadyruntimeStagePromiseannotateDynamicAccessuseDynamicRouteParamsworkStorefallbackParamsfallbackRouteParamsuserenderSignalhasSuspenseRegexbodyAndImplicitTagshasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegexRegExphasMetadataRegexhasViewportRegexhasOutletRegextrackAllowedDynamicAccesscomponentStackdynamicValidation createErrorWithComponentOrOwnerStackownerStackcaptureOwnerStackPreludeStatelogDisallowedDynamicErrorhasReadableErrorStacksthrowIfDisallowedDynamicpreludeidelayUntilRuntimeStageafterTaskAsyncStoragethrowWithStaticGenerationBailoutErrorthrowWithStaticGenerationBailoutErrorWithDynamicErrorthrowForSearchParamsAccessInUseCacheconstructorOptcaptureStackTraceinvalidDynamicUsageErrorisRequestAPICallableInsideAfterafterTaskStorerootTaskSpawnPhasethrowForMissingRequestStoremakeDevtoolsIOAwarePromiseconnectioncallingExpressionphaseisDefinitelyAValidIdentifierdescribeStringPropertyAccesstargetpropdescribeHasCheckingStringPropertystringifiedPropwellKnownPropertiesSetactionAsyncStoragewarnOnceCachedParamsunstable_rootParamscreatePrerenderRootParamsrootParamsunderlyingParamsexportNamekeyhascachedParamsmakeErroringRootParamsaugmentedUnderlyingObjectkeysforEachdefinePropertyenumerablegetRootParamparamNameapiNameactionStoreisAppRouteisActioncreatePrerenderRootParamPromisemakeErroringRootParamPromisetrimwindowMsDatetimestampstallowedremainingresetceilnextUrlipuseRedisREDIS_URLCOSMIC_REDIS_ENABLEDstatusStringresponsematcherHTTPAccessErrorStatusNOT_FOUNDFORBIDDENUNAUTHORIZEDALLOWED_CODESvaluesHTTP_ERROR_FALLBACK_ERROR_CODEisHTTPAccessFallbackErrorhttpStatusNumbergetAccessFallbackHTTPStatusgetAccessFallbackErrorTypeByStatusRedirectStatusCodeREDIRECT_ERROR_CODERedirectTypeisRedirectErrorerrorCodedestinationatstatusCodeisNaNisNextRouterError@1ConcatSourceRawSource// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js  ReplaceSourceReplaceSourceOriginalSource-webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware06undefined924930undefined15491555undefined32863320falseundefined33233345{}undefined34343439__webpack_require__.gundefined35433548__webpack_require__.gundefined35713576__webpack_require__.gundefined RawSource6 ;// ./node_modules/next/dist/esm/server/web/error.js +|webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware06undefined352358undefined582588undefined3 ;// ./node_modules/next/dist/esm/lib/constants.js *webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middleware06undefined6066undefined128134undefined203209undefined250256undefined305311undefined358364undefined427433undefined524530undefined576582undefined628634undefined678684undefined712718undefined752758undefined793799undefined834840undefined875881undefined934940undefined10111017undefined10961102undefined12211227undefined12661272undefined13121318undefined13641370undefined14291435undefined17081714undefined17891795undefined18381844undefined18801879(/* unused pure expression or super */ null && (undefined19131912))undefined19631969undefined21682174undefined22212227undefined22712277undefined23262332undefined23792385undefined24852491undefined25622568undefined26372643undefined27102716undefined27992805undefined28802886undefined29692975undefined30153014(/* unused pure expression or super */ null && (undefined31903189))undefined31923198undefined32383237(/* unused pure expression or super */ null && (undefined33393338))undefined33413347undefined33933392(/* unused pure expression or super */ null && (undefined34823481))undefined34843490undefined35253524(/* unused pure expression or super */ null && (undefined36453644))undefined36473653undefined37053704(/* unused pure expression or super */ null && (undefined38103809))undefined38123818undefined38533852(/* unused pure expression or super */ null && (undefined39743973))undefined39763982undefined41074113undefined42434249undefined42914290(/* unused pure expression or super */ null && (undefined43964395))undefined43984404undefined44414440(/* unused pure expression or super */ null && (undefined45954594))undefined45974603undefined46344633(/* unused pure expression or super */ null && (undefined48454844))undefined48474853undefined48884887(/* unused pure expression or super */ null && (undefined50425041))undefined50445050undefined50795078(/* unused pure expression or super */ null && (undefined51455144))undefined51475153undefined83288379undefined6 ;// ./node_modules/next/dist/esm/server/web/utils.js )webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware094undefined447453undefined16891695undefined39423948undefined47104716undefined52955301undefined53735395__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__._undefined54065436__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._undefineda52435352NEXT_QUERY_PARAM_PREFIXundefined53635488NEXT_INTERCEPTION_MARKER_PREFIXundefinedRawSourceK ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js 'webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware045undefined14491455undefined16321638undefined21252142__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined25292546__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefinedO20652164PageSignatureErrorundefined25512650PageSignatureErrorundefinedRawSourceJ ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js ReplaceSourceSourceMapSourceexport function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,AAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAAA,AAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0],"file":"x"}false06undefinedS ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js L/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map \{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0],"file":"x"}false191197undefinedH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js I/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0],"file":"x"}false207213undefinedM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js import { parsePath } from './parse-path'; /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;CAGC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined164170undefined319327__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!271357parsePathundefinedRawSourceM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js import { parsePath } from './parse-path'; /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;CAIC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined222228undefined377385__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!329415parsePathundefinedRawSourceM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js Simport { parsePath } from './parse-path'; /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,UAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0],"file":"x"}false040undefined328334undefined463471__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!415501parsePathundefinedRawSourceH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js import { addPathPrefix } from './add-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AAEjD;;;;CAIC,GACD,OAAO,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,cAAcM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,cAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,cAAcG,MAAO,MAAGC;AACjC","ignoreList":[0],"file":"x"}zfalse049undefined51100undefined337343undefined767779__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined822834__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined944956__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined_660755pathHasPrefixundefined798893pathHasPrefixundefined10031097addPathPrefixundefinedRawSourceW ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js import { removeTrailingSlash } from './remove-trailing-slash'; import { addPathPrefix } from './add-path-prefix'; import { addPathSuffix } from './add-path-suffix'; import { addLocale } from './add-locale'; export function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map /{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;AAOxC,OAAO,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,UACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,oBAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,cACTD,cAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,cAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,cAAcI,UAAU,OACxBA,WACFN,oBAAoBM;AAC1B","ignoreList":[0],"file":"x"}_false061undefined63112undefined114163undefined165205undefined207213undefined273281__WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__._undefined444462__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined524536__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined538550__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined664676__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined779791__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined821839__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined63150addLocaleundefined313419removeTrailingSlashundefined481575addPathSuffixundefined577671addPathPrefixundefined785879addPathPrefixundefined9821076addPathSuffixundefined11061212removeTrailingSlashundefinedRawSource= ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,AAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0],"file":"x"}false274280undefinedK ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map  {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":"AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0],"file":"x"}false540546undefinedP ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js 6import { pathHasPrefix } from './path-has-prefix'; /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AAEjD;;;;;;;CAOC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,cAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACb","ignoreList":[0],"file":"x"}false049undefined360366undefined796808__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined%739834pathHasPrefixundefinedRawSourceT ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js nimport { normalizeLocalePath } from '../../i18n/normalize-locale-path'; import { removePathPrefix } from './remove-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; export function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map _{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,S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AAOK,cAAc;YACnBL;QAAhBX,KAAKN,QAAQ,GAAGiB,CAAAA,mBAAAA,OAAOjB,QAAAA,AAAQ,KAAA,OAAfiB,mBAAmBX,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,wBAC7BZ,oBAAoBY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0],"file":"x"}false070undefined72127undefined129178undefined180186undefined536548__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined602617__WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__._undefined15261544__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined19071925__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined352447pathHasPrefixundefined501602removePathPrefixundefined15111618normalizeLocalePathundefined19812088normalizeLocalePathundefinedRawSource9 ;// ./node_modules/next/dist/esm/server/web/next-url.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware079undefined81177undefined179238undefined240330undefined683689undefined14441462__WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined15781623undefinedundefined17251735__WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__._undefined19331950__WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__._undefined29853006__WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined11091216getNextPathnameInfoundefined14421533getHostnameundefined17311835detectDomainLocaleundefined28702983formatNextPathnameInfoundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js qwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware0107undefinedG ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware037undefined39104undefined106165undefined167209undefined211217undefined520526undefined699709__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined9661000falseundefined10031120{}undefined12391245__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined12751299__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined14211434__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined14891534 falseundefined153815400undefined26402655__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__._undefined28672880__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._undefined478568validateURLundefined9521030NextURLundefined10601178toNodeOutgoingHttpHeadersundefined13001392_edge_runtime_cookies.RequestCookiesundefined25562651RemovedPageErrorundefined28632954RemovedUAErrorundefinedRawSourceP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js xwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware06undefinedH ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js 8webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware066undefined68105undefined107172undefined174225undefined227270undefined14041410undefined15761590__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined20832097__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined22072221__WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__._undefined25152528__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined26982704__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined27432767__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined41864196__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined44864496__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined1119response_INTERNALSundefined13021396_edge_runtime_cookies.ResponseCookiesundefined18891983_edge_runtime_cookies.ResponseCookiesundefined20932192(0,_edge_runtime_cookies.stringifyCookie)undefined24862570ReflectAdapterundefined26582666response_INTERNALSundefined27402818NextURLundefined28572975toNodeOutgoingHttpHeadersundefined36003608response_INTERNALSundefined43944484validateURLundefined47744864validateURLundefinedRawSourceL ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js S/** * The result of parsing a URL relative to a base URL. */ export function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map D{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD,OAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0],"file":"x"}!false6369undefined687693undefinedJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js export const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map  {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC","ignoreList":[0],"file":"x"} false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefinedG787814app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEundefinedRawSource; ;// ./node_modules/next/dist/esm/server/internal-utils.js rwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middleware078undefined115134__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined139145undefined267273undefined453472__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefinedN36140NEXT_RSC_UNION_QUERYundefined445549NEXT_RSC_UNION_QUERYundefinedRawSourceO ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js 2/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ={"version":3,"sources":["webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3C","ignoreList":[0],"file":"x"}false159165undefined8 ;// ./node_modules/next/dist/esm/shared/lib/segment.js export function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } export function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } export function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } export const PAGE_SEGMENT_KEY = '__PAGE__'; export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":"AAEA,OAAO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEA,OAAO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEA,OAAO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMQ,mBAAmB,WAAU;AAC1C,OAAO,MAAMI,sBAAsB,cAAa","ignoreList":[0],"file":"x"}Lfalse06undefined143149undefined258264undefined611617undefined655661undefinedG ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'; import { isGroupSegment } from '../../segment'; /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map  {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","normalizeRscURL","url","replace"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,iBAAiBC,KAAa;IAC5C,OAAOH,mBACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,eAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAA,CAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACD,OAAO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0],"file":"x"}+false073undefined75121undefined747753undefined800817__WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__._undefined10281041__WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._undefined16091615undefinedH672777ensureLeadingSlashundefined9881085isGroupSegmentundefinedRawSourceP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js )webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middleware042undefined6571undefined331337undefined955968__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined16061619__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined17941807__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined23302343__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined24942507__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined31143127__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined32643277__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined39013914__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined44684481__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined898982ReflectAdapterundefined16201704ReflectAdapterundefined18791963ReflectAdapterundefined24862570ReflectAdapterundefined27212805ReflectAdapterundefined34123496ReflectAdapterundefined36333717ReflectAdapterundefined43414425ReflectAdapterundefined49795063ReflectAdapterundefinedRawSourceK ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|shared876882undefined10591065undefined12391245undefinedC885907async_local_storage_createAsyncLocalStorageundefinedRawSourceS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js  webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared063undefined6571undefined105127__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB34149async_local_storage_createAsyncLocalStorageundefinedRawSourceS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js >webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared54177undefined179234undefinedX ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware043undefined4589undefined91133undefined135217undefined240246undefined566572undefined969982__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined11371143undefined13691375undefined21182124undefined22422256__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined25832598__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined30263040__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined47344747__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined48614867undefined56735686__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined57785784undefined63646370undefinedm350370request_cookies_RequestCookiesAdapterundefined740824ReflectAdapterundefined20632157_edge_runtime_cookies.ResponseCookiesundefined24842572workAsyncStorageInstanceundefined30003094_edge_runtime_cookies.ResponseCookiesundefined47884872ReflectAdapterundefined57915875ReflectAdapterundefined65556585request_cookies_responseCookiesToRequestCookiesundefinedRawSource@ ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middleware63946400undefined70877093undefined72607473undefinedO54795486constants_NodeSpanundefined55965603constants_NodeSpanundefinedRawSource< ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js O/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0],"file":"x"}false136142undefined= ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js ~webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware072undefined74134undefined674708trueundefined723729__webpack_require__undefined731750817undefined761908{}undefined9951001undefined11391145undefined36493672__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined48114826__WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__._undefined62146223__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined73247347__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined93189364undefined33193423NextVanillaSpanAllowlistundefined45624650LogSpanAllowListundefined60386127isThenableundefined72287332NextVanillaSpanAllowlistundefined92149222tracer_getTracerundefinedRawSource< ;// ./node_modules/next/dist/esm/server/api-utils/index.js {|webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middleware071undefined73182undefined184231undefined233282undefined284290undefined703709undefined930936undefined16151621undefined16981711__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined17701796__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__._undefined19271968__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._undefined20562062undefined21222128undefined21872193undefined22252224(/* unused pure expression or super */ null && (undefined22402239))undefined22422248undefined23132319undefined23892395undefined25362542__webpack_require__undefined25442570663undefined31363173 trueundefined318631900undefined32133232"production"undefined37533790 trueundefined380338070undefined38303849"production"undefined41794185undefined44554461undefined47754781undefined13901474HeadersAdapterundefined15331650PRERENDER_REVALIDATE_HEADERundefined17811928PRERENDER_REVALIDATE_ONLY_GENERATED_HEADERundefinedRawSourceN ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js xyVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware086undefined8894undefined406430__WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__._undefined529556__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined860896 falseundefined9019470undefined15331560__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined16531690 trueundefined170317070undefined17301749"production"undefined21212148__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined22242261 trueundefined227422780undefined23012320"production"undefined312431checkIsOnDemandRevalidateundefined530650COOKIE_NAME_PRERENDER_BYPASSundefined15501670COOKIE_NAME_PRERENDER_BYPASSundefined21862306COOKIE_NAME_PRERENDER_BYPASSundefinedRawSourceH ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js uvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middleware075undefined77148undefined150336undefined338417undefined419476undefined478527undefined580593__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined635648__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined701714__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined812825__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined827840__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined869896__WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined14781495__WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__._undefined16191633__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined18351841undefined22822288undefined39273940__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined39423955__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined42024222__WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined49084942__WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__._undefined52005216__WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._undefined55545560undefined57141HeadersAdapterundefined183275FLIGHT_HEADERSundefined328412HeadersAdapterundefined510602_edge_runtime_cookies.RequestCookiesundefined604688HeadersAdapterundefined717829MutableRequestCookiesAdapterundefined14111515splitCookiesStringundefined16391733_edge_runtime_cookies.ResponseCookiesundefined40134105_edge_runtime_cookies.RequestCookiesundefined41074191HeadersAdapterundefined44384536request_cookies_RequestCookiesAdapterundefined52225361createCookiesWithMutableAccessCheckundefined56195717DraftModeProviderundefinedRawSourceX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js rswebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|shared063undefined6571undefined109131__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB38153async_local_storage_createAsyncLocalStorageundefinedRawSourceJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js o~ false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefined615app_router_headers_RSC_HEADERundefined3244app_router_headers_ACTION_HEADERundefined285313app_router_headers_NEXT_ROUTER_STATE_TREE_HEADERundefined349375app_router_headers_NEXT_ROUTER_PREFETCH_HEADERundefined659693app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERundefined735757app_router_headers_NEXT_HMR_REFRESH_HEADERundefined787814components_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEundefined853860app_router_headers_NEXT_URLundefined882904app_router_headers_RSC_CONTENT_TYPE_HEADERundefined934947app_router_headers_FLIGHT_HEADERSundefined957966app_router_headers_RSC_HEADERundefined9731001app_router_headers_NEXT_ROUTER_STATE_TREE_HEADERundefined10081034app_router_headers_NEXT_ROUTER_PREFETCH_HEADERundefined10411063app_router_headers_NEXT_HMR_REFRESH_HEADERundefined10701104app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERundefined11151134app_router_headers_NEXT_RSC_UNION_QUERYundefined11521180app_router_headers_NEXT_ROUTER_STALE_TIME_HEADERundefined12131236app_router_headers_NEXT_DID_POSTPONE_HEADERundefined12681293app_router_headers_NEXT_REWRITTEN_PATH_HEADERundefined13301356app_router_headers_NEXT_REWRITTEN_QUERY_HEADERundefined13941417app_router_headers_NEXT_IS_PRERENDER_HEADERundefined14491476app_router_headers_NEXT_ACTION_NOT_FOUND_HEADERundefinedRawSource@ ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js l{#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}|3619invariant_error_InvariantErrorundefinedRawSourceX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js hiwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared54186undefined188277undefined279344undefined346409undefined411417undefined768774undefined10301036undefined17091715undefined27202726undefined35213527undefined41094115undefined47914797undefined54005406undefined58735879undefined6793work_unit_async_storage_external_throwForMissingRequestStoreundefined54665487work_unit_async_storage_external_getRuntimeStagePromiseundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js etw7619lib_invariant_error_InvariantErrorundefinedRawSource: ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js cdhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware12541260undefinedeY ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js ap// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map(); export const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;AACrB,OAAO,MAAMA,eAAe,IAAIC,MAAqB;AAErD,OAAO,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0],"file":"x"}#false102108undefined141147undefinedaP ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js ][K/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; k/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache'; import { isStale, tagsManifest } from '../incremental-cache/tags-manifest.external'; // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; export default DefaultCacheHandler; //# sourceMappingURL=default.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,SACtB,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BE;AAEJ,MAAMC,sBAAsC;IAC1C,MAAMC,KAAIC,QAAQ;QAChB,MAAMC,iBAAiBZ,YAAYU,GAAG,CAACC;QAEvC,IAAIC,gBAAgB;YAClBV,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,MAAMC;QACR;QAEA,MAAMC,eAAehB,YAAYa,GAAG,CAACC;QAErC,IAAI,CAACE,cAAc;YACjBX,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,OAAOH;QACT;QAEA,MAAMV,QAAQe,aAAaf,KAAK;QAChC,IACEgB,YAAYC,UAAU,GAAGD,YAAYE,GAAG,KACxClB,MAAMmB,SAAS,GAAGnB,MAAMoB,UAAU,GAAG,MACrC;YACA,qEAAqE;YACrE,yEAAyE;YACzE,kBAAkB;YAClBhB,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YAEzB,OAAOH;QACT;QAEA,IA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O8B,KAAK;YACZ,+DAA+D;YAC/DvC,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU,UAAU8B;QACrC,SAAU;YACRd;YACA3B,YAAY0C,MAAM,CAAC/B;QACrB;IACF;IAEA,MAAMgC;IACJ,gDAAgD;IAClD;IAEA,MAAMC,eAAc,GAAGzB,IAAI;QACzB,MAAM0B,aAAaC,KAAKC,GAAG,IACtB5B,KAAK6B,GAAG,CAAC,CAACC,MAAQrD,aAAac,GAAG,CAACuC,QAAQ;QAGhD/C,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,aAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,eAAeR,oBAAmB","ignoreList":[0],"file":"x"}false448487undefined489572undefined652659__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined17771783__WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._undefined29542959Bufferundefined37063717__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined41954206__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined42484262/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined42484262undefined42634262(/* unused pure expression or super */ null && (undefined42824281))undefined42824282.5);undefined603683LRUCacheundefined880898default_external_DefaultCacheHandlerundefined18011884isStaleundefined38073887tagsManifestundefined43654445tagsManifestundefined45224547default_externalundefined46004618default_external_DefaultCacheHandlerundefinedRawSource? ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js WXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware072undefined797803undefined28532859undefined34163422undefined38063812undefined41174123undefinedK711handlers_debugundefined888892handlers_debugundefined913917handlers_debugundefined990994handlers_debugundefined10151019handlers_debugundefined12841288handlers_debugundefined13091313handlers_debugundefined14551459handlers_debugundefined14801484handlers_debugundefined17171721handlers_debugundefined17421746handlers_debugundefined19191923handlers_debugundefined19441948handlers_debugundefined20952099handlers_debugundefined21202124handlers_debugundefined22572261handlers_debugundefined22822286handlers_debugundefined44194423handlers_debugundefined44444448handlers_debugundefinedRawSource? ;// ./node_modules/next/dist/esm/server/revalidation-utils.js TUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware055undefined142148undefined20362051__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._undefined22242230undefined*19732074getCacheHandlersundefinedRawSourceRSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middleware876882undefined10591065undefined12391245undefined645async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined258278async_local_storage_FakeAsyncLocalStorageundefined312351async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined520559async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined595634async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined675714async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined778805async_local_storage_maybeGlobalAsyncLocalStorageundefined885907app_render_async_local_storage_createAsyncLocalStorageundefined921948async_local_storage_maybeGlobalAsyncLocalStorageundefined972999async_local_storage_maybeGlobalAsyncLocalStorageundefined10251045async_local_storage_FakeAsyncLocalStorageundefined10611072async_local_storage_bindSnapshotundefined10881115async_local_storage_maybeGlobalAsyncLocalStorageundefined11351162async_local_storage_maybeGlobalAsyncLocalStorageundefined11911211async_local_storage_FakeAsyncLocalStorageundefined12341247async_local_storage_createSnapshotundefined12611288async_local_storage_maybeGlobalAsyncLocalStorageundefined13081335async_local_storage_maybeGlobalAsyncLocalStorageundefinedRawSourceY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js OPwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middleware063undefined6571undefined110132__WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedM39154app_render_async_local_storage_createAsyncLocalStorageundefinedRawSourceY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js LMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware54213undefined215247undefinedN@ ;// ./node_modules/next/dist/esm/server/after/after-context.js JK9webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middleware053undefined55120undefined122179undefined181257undefined259321undefined323387undefined389474undefined476563undefined565571undefined829840__WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__._undefined917926__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined17631782__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined19181938__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined30943105__WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__._undefined31593179__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined37823797__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined38813894__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined41124133__WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._undefined49754988__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined265343(p_queue_default())undefined420509isThenableundefined13461442workUnitAsyncStorageInstanceundefined15781676afterTaskAsyncStorageInstanceundefined28322925async_local_storage_bindSnapshotundefined29793077afterTaskAsyncStorageInstanceundefined36803768workAsyncStorageInstanceundefined38523944lib_invariant_error_InvariantErrorundefined41624275withExecuteRevalidatesundefined51175209lib_invariant_error_InvariantErrorundefinedRawSource< ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js GHwwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware181187undefined807813undefinedIE ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js EFwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middleware053undefined55129undefined131184undefined186248undefined250316undefined318324undefined18131828__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__._undefined29532966__WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__._undefined32733284__WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__._undefined36213642__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined38293844__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined14931594normalizeAppPathundefined27192816async_local_storage_createSnapshotundefined31233211AfterContextundefined35483661getCacheHandlerEntriesundefined38483949createLazyResultundefinedRawSource= ;// ./node_modules/next/dist/esm/server/web/web-on-close.js BCwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware136142undefined616622undefined11741180undefinedDG ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js @Aswebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middleware235241undefinedBJ ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js >?webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware075undefined7783undefined585591undefined@> ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js <=webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware064undefined66128undefined130178undefined12761297__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined14861501__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined16191625undefined19401965__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined22262251__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined10991212getCacheHandlerEntriesundefined14011502createLazyResultundefined19342049NEXT_CACHE_IMPLICIT_TAG_IDundefined23102425NEXT_CACHE_IMPLICIT_TAG_IDundefinedRawSource? ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js 9:kwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware163169undefined;8 ;// ./node_modules/next/dist/esm/server/web/adapter.js 78webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware044undefined46124undefined126217undefined219273undefined275331undefined333428undefined430466undefined468529undefined531604undefined606772undefined774833undefined835908undefined910995undefined9971058undefined10601136undefined11381226undefined12281275undefined12771332undefined13341382undefined13841446undefined14481523undefined15251579undefined15811639undefined16411647undefined16781688__WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__._undefined18641881__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined21212138__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined23762393__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined27592767__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined32473253__webpack_require__undefined32553299720undefined34113417undefined35293559__WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__._undefined37153729__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__._undefined38323838__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined43344356__WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__._undefined49004926__WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined50455062__WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__._undefined50835092__WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__._undefined53515364__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined56085653 falseundefined565756830undefined57495768__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined59165940__WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._undefined69396958"production"undefined70127052""undefined70727091"production"undefined74027420__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined76857708__WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__._undefined77927805__WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__._undefined86048618__WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__._undefined86428650__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined86608673__WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__._undefined93209338__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined95169530__WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__._undefined96189641__WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__._undefined97539767__WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__._undefined1092310949__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__._undefined1112011135__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined1115611175__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined1268612692__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1285512901 trueundefined1341613431__WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._undefined1370613759 falseundefined13764138050undefined1423214257__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__._undefined1439414420__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._undefined1538415403__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1544915468__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1594815954__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1631716363trueundefined1693716950__WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__._undefined1706517076__WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined1778417811__WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._undefined`53139NextRequestundefined315414PageSignatureErrorundefined654753PageSignatureErrorundefined9911090PageSignatureErrorundefined14561543tracer_getTracerundefined22682398ensureInstrumentationRegisteredundefined25542653normalizeRscURLundefined27562834NextURLundefined33303444normalizeNextQueryParamundefined39884110fromNodeOutgoingHttpHeadersundefined42294334isRSCRequestHeaderundefined43554439RSC_HEADERundefined46984790FLIGHT_HEADERSundefined51095213NEXT_RSC_UNION_QUERYundefined53615480stripInternalSearchParamsundefined68876994getEdgePreviewPropsundefined72597376getBuiltinRequestContextundefined74607551NextFetchEventundefined83508444CloseControllerundefined84688555tracer_getTracerundefined85658644MiddlewareSpanundefined92919398getEdgePreviewPropsundefined95769675getImplicitTagsundefined97639880createRequestStoreForAPIundefined999210091createWorkStoreundefined1124711365NEXT_ROUTER_PREFETCH_HEADERundefined1153611624workAsyncStorageInstanceundefined1164511741workUnitAsyncStorageInstanceundefined1325213330NextURLundefined1401214113parseRelativeURLundefined1482514941NEXT_REWRITTEN_PATH_HEADERundefined1507815196NEXT_REWRITTEN_QUERY_HEADERundefined1616016264NEXT_RSC_UNION_QUERYundefined1631016414NEXT_RSC_UNION_QUERYundefined1689416972NextURLundefined1791218009getRelativeURLundefined1812418204NextResponseundefined1891219036getWaitUntilPromiseFromEventundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js 45webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware053undefined5561undefined474480undefined626632undefined6K ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js 23wwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middleware145186undefined48 ;// ./node_modules/next/dist/esm/server/after/after.js 01pwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware076undefined187193undefined28 ;// ./node_modules/next/dist/esm/server/after/index.js ./awebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware023undefined0 // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js ,;const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; export class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } export function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map {"version":3,"sources":["webpack://../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}!false5157undefined258264undefined=5774hooks_server_context_DynamicServerErrorundefinedRawSourceQ ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js '6const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; export class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } export function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map {"version":3,"sources":["webpack://../../../src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":"AAAA,MAAMA,0BAA0B;AAEhC,OAAO,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEA,OAAO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0],"file":"x"}!false5965undefined205211undefinedE6585static_generation_bailout_StaticGenBailoutErrorundefinedRawSourceD ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js "#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware06undefined11021108undefined25102516undefinedD11041121dynamic_rendering_utils_makeHangingPromiseundefinedRawSourceF ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js  webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middleware06undefined6874undefined136142undefined200206undefined!L ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js ,// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}#false260266undefined566572undefined8266282bailout_to_csr_BailoutToCSRErrorundefinedRawSourceI ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js 'xx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react'; import { DynamicServerError } from '../../client/components/hooks-server-context'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { getRuntimeStagePromise, workUnitAsyncStorage } from './work-unit-async-storage.external'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants'; import { scheduleOnNextTick } from '../../lib/scheduler'; import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'; import { InvariantError } from '../../shared/lib/invariant-error'; const hasPostpone = typeof React.unstable_postpone === 'function'; export function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } export function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } export function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } export function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; export function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } export function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } export function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } export function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } export function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } export function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } export function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } export function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); export function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = "production" !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } export var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); export function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } export function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } export function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map {"version":3,"sources":["webpack://../../../src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AACxF,OAAOA,WAAW,QAAO;AAEzB,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,sBAAsB,EACtBC,oBAAoB,QACf,qCAAoC;AAC3C,SAASC,gBAAgB,QAAQ,4CAA2C;AAC5E,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,QACpB,yCAAwC;AAC/C,SAASC,kBAAkB,QAAQ,sBAAqB;AACxD,SAASC,iBAAiB,QAAQ,+CAA8C;AAChF,SAASC,cAAc,QAAQ,mCAAkC;AAEjE,MAAMC,cAAc,OAAOd,MAAMe,iBAAiB,KAAK;AAwCvD,OAAO,SAASC,2BACdC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AC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEA,OAAO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"file":"x"}false15771602undefined16041685undefined16871776undefined17781875undefined18771953undefined19552018undefined20202172undefined21742230undefined22322312undefined23142379undefined24082412__WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._undefined24482454undefined26402646undefined28782884undefined34183424undefined60116039falseundefined60426114{}undefined64066412undefined73497355undefined81368164falseundefined81678231{}undefined89888994undefined97459751undefined1038310389undefined1216512171undefined1253412540undefined1258812587(/* unused pure expression or super */ null && (undefined1262512624))undefined1262712633undefined1292012926undefined1374213748undefined1484414850undefined1506915075undefined1516515171undefined1551815524undefined1712317129undefined1769017696undefined1983919845undefined2017520181undefined2356723591__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2366023681__WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2374423765__WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2382623845__WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2385923865undefined2606826123 falseundefined26127261510undefined2642926435undefined2669326699undefined2746427470undefined3058830594undefined816141679react_react_serverundefined43694388dynamic_rendering_postponeWithTrackingundefined55595590dynamic_rendering_throwToInterruptStaticGenerationundefined64956525dynamic_rendering_trackDynamicDataInDynamicRenderundefined1191511934dynamic_rendering_postponeWithTrackingundefined1198011999dynamic_rendering_postponeWithTrackingundefined2029720316dynamic_rendering_postponeWithTrackingundefined2254822662ROOT_LAYOUT_BOUNDARY_NAMEundefined2273122839METADATA_BOUNDARY_NAMEundefined2290223010VIEWPORT_BOUNDARY_NAMEundefined2307123175OUTLET_BOUNDARY_NAMEundefinedRawSource: ;// ./node_modules/next/dist/esm/server/request/utils.js "Limport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } export function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map b {"version":3,"sources":["webpack://../../../src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;AAGvF,OAAO,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEA,OAAO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,AAAkB,MAAK;AAChD","ignoreList":[0],"file":"x"}_false089undefined91178undefined180186undefined626632undefined11151121undefined18801886undefined?16901720utils_isRequestAPICallableInsideAfterundefinedRawSource? ;// ./node_modules/next/dist/esm/server/request/connection.js Mimport { workAsyncStorage } from '../app-render/work-async-storage.external'; import { throwForMissingRequestStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender } from '../app-render/dynamic-rendering'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { makeHangingPromise, makeDevtoolsIOAwarePromise } from '../dynamic-rendering-utils'; import { isRequestAPICallableInsideAfter } from './utils'; /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if ("production" === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ^!{"version":3,"sources":["webpack://../../../src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynamicTracking","process","env","NODE_ENV"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,4CAA2C;AAC5E,SACEC,2BAA2B,EAC3BC,oBAAoB,QACf,iDAAgD;AACvD,SACEC,oBAAoB,EACpBC,gCAAgC,EAChCC,+BAA+B,QAC1B,kCAAiC;AACxC,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,kBAAkB,EAClBC,0BAA0B,QACrB,6BAA4B;AACnC,SAASC,+BAA+B,QA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F;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBACH,MAAM,OAAA,cAEL,CAFK,IAAIR,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,0XAA0X,CAAC,GADhZ,qBAAA;+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,OAAOV,mBACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,OAAOd,qBACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,OAAOxB,iCACL,cACAQ,WACAE;gBAEJ,KAAK;oBACHT,gCAAgCS;oBAChC,IAAIe,AA1Fc,QA0FNC,GAAG,CAACC,KAAa,GAAL,YAAoB;wBAC1C,wEAAwE;wBACxE,8EAA8E;wBAC9E,4EAA4E;wBAC5E,OAAOvB,2BAA2Ba;oBACpC,OAAO;wBACL,OAAOF,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9B","ignoreList":[0],"file":"x"}false076undefined78192undefined194331undefined333422undefined424515undefined517574undefined777783undefined62136242falseundefined62456638{}undefinedD ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js  // This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; export function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } export function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map R {"version":3,"sources":["webpack://../../../../src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAErC,OAAO,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEA,OAAO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEA,OAAO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0],"file":"x"}2false466472undefined695701undefined939945undefinedr475502reflect_utils_describeStringPropertyAccessundefined931949reflect_utils_wellKnownPropertiesundefinedRawSourceU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js { webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared063undefined6571undefined107129__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB36151async_local_storage_createAsyncLocalStorageundefinedRawSourceU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js y@webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared54181undefined183242undefined4 ;// ./node_modules/next/dist/esm/lib/picocolors.js x_webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware17941800undefined18151814(/* unused pure expression or super */ null && (undefined18591858))undefined18611867undefined19341940undefined20062012undefined20622068undefined21212127undefined21782184undefined22342240undefined22972303undefined23532359undefined24072413undefined24632469undefined25202526undefined25752581undefined26332639undefined27042710undefined27592765undefined28152821undefined28702876undefined29282934undefined29842990undefined30423048undefined31013107undefined31583164undefined32183224undefined32753281undefinedL18001804picocolors_resetundefined21922197picocolors_hiddenundefinedRawSource6 ;// ./node_modules/next/dist/esm/build/output/log.js vwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware079undefined81134undefined136142undefined172176__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined178181__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined201203__WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__._undefined205208__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined227232__WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__._undefined234237__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined272276__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined278281__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined301305__WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__._undefined307310__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined330336__WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__._undefined338341__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined12661272undefined14931499undefined15671573undefined16431649undefined17171723undefined17931799undefined18671873undefined19431949undefined20452052__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined20852091undefined`31110whiteundefined112189boldundefined209284redundefined286363boldundefined382463yellowundefined465542boldundefined577656whiteundefined658735boldundefined755834greenundefined836913boldundefined9331016magentaundefined10181095boldundefined25882592log_eventundefined26572661log_traceundefined27432823LRUCacheundefined28652872log_warnOnceundefinedRawSource@ ;// ./node_modules/next/dist/esm/server/request/root-params.js  y5import { InvariantError } from '../../shared/lib/invariant-error'; import { postponeWithTracking, throwToInterruptStaticGeneration } from '../app-render/dynamic-rendering'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils'; import { actionAsyncStorage } from '../app-render/action-async-storage.external'; import { warnOnce } from '../../build/output/log'; const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map H{"version":3,"sources":["webpack://../../../src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SACEC,oBAAoB,EACpBC,gCAAgC,QAC3B,kCAAiC;AACxC,SACEC,gBAAgB,QAEX,4CAA2C;AAClD,SACEC,oBAAoB,QAIf,iDAAgD;AACvD,SAASC,kBAAkB,QAAQ,6BAA4B;AAG/D,SACEC,4BAA4B,EAC5BC,mBAAmB,QACd,uCAAsC;AAC7C,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,QAAQ,QAAQ,yBAAwB;AAGjD,MAAMC,eAAe,IAAIC;AAEzB;;CAEC,GACD,OAAO,eAAeC;IACpBH,SACE;IAEF,MAAMI,YAAYV,iBAAiBW,QAAQ;IAC3C,IAAI,CAACD,WAAW;QACd,MAAM,OAAA,cAA8D,CAA9D,IAAIb,eAAe,6CAAnB,qBAAA;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMe,gBAAgBX,qBAAqBU,QAAQ;IAEnD,IAAI,CAACC,eAAe;QAClB,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,8FAA8F,CAAC,GADpH,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,OAAQF,cAAcG,IAAI;QACxB,KAAK;QACL,KAAK;YAAkB;gBACrB,MAAM,OAAA,cAEL,CAFK,IAAIF,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,kKAAkK,CAAC,GADxL,qBAAA;2BAAA;gCAAA;kCAAA;gBAEN;YACF;QACA,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAOE,0BACLJ,cAAcK,UAAU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List":[0],"file":"x"}false065undefined67171undefined173249undefined251336undefined338401undefined403507undefined509589undefined591640undefined762768undefined73687374undefined> ;// ./node_modules/next/dist/esm/server/web/exports/index.js qwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware77141undefined143198undefined200257undefined259336undefined338396undefined398433undefined435488undefined490553undefined0 ;// ./node_modules/next/dist/esm/api/server.js pYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware043undefined ;// ./src/middleware.js false042undefined746752undefined872883__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined11531164__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._undefined16711682__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19631974__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19861992undefined{822902NextResponseundefined11721260NextResponseundefined17671847NextResponseundefined21282208NextResponseundefinedRawSourcea ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js 1export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } export function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } export function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map  {"version":3,"sources":["webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"file":"x"}Nfalse06undefined173179undefined515521undefined864870undefined10011007undefinedF510534http_access_fallback_isHTTPAccessFallbackErrorundefinedRawSourceL ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js export var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map h{"version":3,"sources":["webpack://../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0],"file":"x"}<421redirect_status_code_RedirectStatusCodeundefinedRawSourceF ;// ./node_modules/next/dist/esm/client/components/redirect-error.js cimport { RedirectStatusCode } from './redirect-status-code'; export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; export var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map i{"version":3,"sources":["webpack://../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAA,CAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0],"file":"x"}<false059undefined6167undefined113119undefined502508undefined6437451redirect_error_isRedirectErrorundefinedRawSourceL ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js import { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback'; import { isRedirectError } from './redirect-error'; /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map {"version":3,"sources":["webpack://../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0],"file":"x"}.false087undefined89139undefined316322undefined ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19! _webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware037undefined3993undefined124187undefined189269undefined271355undefined378381__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._undefined12221258falseundefined12611471{}undefined16221654__WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__._undefined20442058undefined20962102__WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._undefinedr55100middleware_namespaceObjectundefined11001234edgeInstrumentationOnRequestErrorundefined16611744adapterundefinedD @ getEdgeInstrumentationModuleinstrumentationModulePromiseregisterInstrumentationedgeInstrumentationOnRequestErrorregisterInstrumentationPromiseensureInstrumentationRegisteredgetUnsupportedModuleErrorMessage__import_unsupportedenhanceGlobalsglobals_namespaceObjectPageSignatureErrorRemovedPageErrorRemovedUAErrorerror_namespaceObjectTEXT_PLAIN_CONTENT_TYPE_HEADERHTML_CONTENT_TYPE_HEADERJSON_CONTENT_TYPE_HEADERNEXT_QUERY_PARAM_PREFIXNEXT_INTERCEPTION_MARKER_PREFIXMATCHED_PATH_HEADERPRERENDER_REVALIDATE_HEADERPRERENDER_REVALIDATE_ONLY_GENERATED_HEADERRSC_PREFETCH_SUFFIXRSC_SEGMENTS_DIR_SUFFIXRSC_SEGMENT_SUFFIXRSC_SUFFIXACTION_SUFFIXNEXT_DATA_SUFFIXNEXT_META_SUFFIXNEXT_BODY_SUFFIXNEXT_CACHE_TAGS_HEADERNEXT_CACHE_REVALIDATED_TAGS_HEADERNEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADERNEXT_RESUME_HEADERNEXT_CACHE_TAG_MAX_ITEMSNEXT_CACHE_TAG_MAX_LENGTHNEXT_CACHE_SOFT_TAG_MAX_LENGTHNEXT_CACHE_IMPLICIT_TAG_IDCACHE_ONE_YEARINFINITE_CACHEMIDDLEWARE_FILENAMEMIDDLEWARE_LOCATION_REGEXPINSTRUMENTATION_HOOK_FILENAMEPAGES_DIR_ALIASDOT_NEXT_ALIASROOT_DIR_ALIASAPP_DIR_ALIASRSC_MOD_REF_PROXY_ALIASRSC_ACTION_VALIDATE_ALIASRSC_ACTION_PROXY_ALIASRSC_CACHE_WRAPPER_ALIASRSC_DYNAMIC_IMPORT_WRAPPER_ALIASRSC_ACTION_ENCRYPTION_ALIASRSC_ACTION_CLIENT_WRAPPER_ALIASPUBLIC_DIR_MIDDLEWARE_CONFLICTSSG_GET_INITIAL_PROPS_CONFLICTSERVER_PROPS_GET_INIT_PROPS_CONFLICTSERVER_PROPS_SSG_CONFLICTSTATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERRORSERVER_PROPS_EXPORT_ERRORGSP_NO_RETURNED_VALUEGSSP_NO_RETURNED_VALUEUNSTABLE_REVALIDATE_RENAME_ERRORGSSP_COMPONENT_MEMBER_ERRORNON_STANDARD_NODE_ENVSSG_FALLBACK_EXPORT_ERRORESLINT_DEFAULT_DIRSSERVER_RUNTIMEWEBPACK_LAYERS_NAMESWEBPACK_LAYERSWEBPACK_RESOURCE_QUERIESconstants_namespaceObjectfromNodeOutgoingHttpHeaderssplitCookiesStringtoNodeOutgoingHttpHeadersvalidateURLnormalizeNextQueryParamutils_namespaceObjectresponseSymbolpassThroughSymbolwaitUntilSymbolFetchEventgetWaitUntilPromiseFromEventNextFetchEventfetch_event_namespaceObjectdetect_domain_locale_namespaceObjectremove_trailing_slash_namespaceObjectparse_path_namespaceObjectadd_path_prefix_namespaceObjectadd_path_suffix_namespaceObjectpath_has_prefix_namespaceObjectadd_locale_namespaceObject!format_next_pathname_info_namespaceObject&get_hostname_namespaceObject+-normalize_locale_path_namespaceObject4remove_path_prefix_namespaceObject5get_next_pathname_info_namespaceObjectREGEX_LOCALHOST_HOSTNAMEparseURLInternalNextURLnext_url_namespaceObject_edge_runtime_cookiescookies_namespaceObjectcookies_defaultspec_extension_cookies_namespaceObjectINTERNALSNextRequestrequest_namespaceObjectReflectAdapterreflect_namespaceObjectresponse_INTERNALSREDIRECTShandleMiddlewareField response_namespaceObject-5relativize_url_namespaceObject56789:app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE;<=>?@ABCDapp_router_headers_namespaceObjectINTERNAL_QUERY_NAMESstripInternalQueriesstripInternalSearchParamsinternal_utils_namespaceObject@ensure_leading_slash_namespaceObject@ABFJsegment_namespaceObjectJLapp_paths_namespaceObjectReadonlyHeadersErrorHeadersAdapterheaders_namespaceObjectsharedAsyncLocalStorageNotAvailableErrorFakeAsyncLocalStoragemaybeGlobalAsyncLocalStorageasync_local_storage_createAsyncLocalStoragebindSnapshotcreateSnapshotasync_local_storage_namespaceObjectworkAsyncStorageInstancework_async_storage_instance_namespaceObjectwork_async_storage_external_namespaceObjectReadonlyRequestCookiesErrorrequest_cookies_RequestCookiesAdapterSYMBOL_MODIFY_COOKIE_VALUESgetModifiedCookieValuesappendMutableCookiesMutableRequestCookiesAdaptercreateCookiesWithMutableAccessCheckareCookiesMutableInCurrentPhaseensureCookiesAreStillMutablerequest_cookies_responseCookiesToRequestCookiesrequest_cookies_namespaceObjectBaseServerSpanLoadComponentsSpanNextServerSpanNextNodeServerSpanStartServerSpanRenderSpanAppRenderSpanRouterSpanconstants_NodeSpanAppRouteRouteHandlersSpanResolveMetadataSpanMiddlewareSpanNextVanillaSpanAllowlistLogSpanAllowListtrace_constants_namespaceObject%is_thenable_namespaceObjectNEXT_OTEL_PERFORMANCE_PREFIXapipropagationtraceSpanStatusCodeSpanKindROOT_CONTEXTBubbledErrorisBubbledErrorcloseSpanWithErrorrootSpanAttributesStorerootSpanIdKeylastSpanIdgetSpanIdclientTraceDataSetterNextTracerImpltracer_getTracertracer_namespaceObjectwrapApiHandlersendStatusCoderedirectcheckIsOnDemandRevalidateCOOKIE_NAME_PRERENDER_BYPASSCOOKIE_NAME_PRERENDER_DATARESPONSE_LIMIT_DEFAULTSYMBOL_PREVIEW_DATASYMBOL_CLEARED_COOKIESclearPreviewDataApiErrorsendErrorsetLazyPropapi_utils_namespaceObjectDraftModeProviderdraft_mode_provider_namespaceObjectgetHeadersgetMutableCookiesmergeMiddlewareCookiescreateRequestStoreForRendercreateRequestStoreForAPIcreateRequestStoreImplsynchronizeMutableCookiesrequest_store_namespaceObjectworkUnitAsyncStorageInstancework_unit_async_storage_instance_namespaceObjectapp_router_headers_RSC_HEADERapp_router_headers_ACTION_HEADERapp_router_headers_NEXT_ROUTER_STATE_TREE_HEADERapp_router_headers_NEXT_ROUTER_PREFETCH_HEADERapp_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERapp_router_headers_NEXT_HMR_REFRESH_HEADERcomponents_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEapp_router_headers_NEXT_URLapp_router_headers_RSC_CONTENT_TYPE_HEADERapp_router_headers_FLIGHT_HEADERSapp_router_headers_NEXT_RSC_UNION_QUERYapp_router_headers_NEXT_ROUTER_STALE_TIME_HEADERapp_router_headers_NEXT_DID_POSTPONE_HEADERapp_router_headers_NEXT_REWRITTEN_PATH_HEADERapp_router_headers_NEXT_REWRITTEN_QUERY_HEADERapp_router_headers_NEXT_IS_PRERENDER_HEADERapp_router_headers_NEXT_ACTION_NOT_FOUND_HEADERcomponents_app_router_headers_namespaceObjectinvariant_error_InvariantErrorinvariant_error_namespaceObjectwork_unit_async_storage_external_throwForMissingRequestStorethrowInvariantForMissingStoregetPrerenderResumeDataCachegetRenderResumeDataCachegetHmrRefreshHashisHmrRefreshgetServerComponentsHmrCachegetDraftModeProviderForCacheScopegetCacheSignalwork_unit_async_storage_external_getRuntimeStagePromisework_unit_async_storage_external_namespaceObjectp_queuep_queue_namespaceObjectp_queue_defaultlib_invariant_error_InvariantErrorlib_invariant_error_namespaceObjectLRUNodeSentinelNodelru_cache_namespaceObjecttags_manifest_external_namespaceObjectdefault_external_DefaultCacheHandlerdefault_externaldefault_external_namespaceObjecthandlers_debughandlersSymbolhandlersMapSymbolhandlersSetSymbolreferenceinitializeCacheHandlersgetCacheHandlergetCacheHandlersgetCacheHandlerEntriessetCacheHandlerhandlers_namespaceObjectwithExecuteRevalidatescloneRevalidationStatediffRevalidationStaterevalidateTagsexecuteRevalidatesrevalidation_utils_namespaceObjectasync_local_storage_sharedAsyncLocalStorageNotAvailableErrorasync_local_storage_FakeAsyncLocalStorageasync_local_storage_maybeGlobalAsyncLocalStorageapp_render_async_local_storage_createAsyncLocalStorageasync_local_storage_bindSnapshotasync_local_storage_createSnapshotapp_render_async_local_storage_namespaceObjectafterTaskAsyncStorageInstanceafter_task_async_storage_instance_namespaceObjectafter_task_async_storage_external_namespaceObjectAfterContexterrorWaitUntilNotAvailableafter_context_namespaceObjectcreateLazyResultisResolvedLazyResultlazy_result_namespaceObjectcreateWorkStorecreateAfterContextcreateRefreshTagsByCacheKindwork_store_namespaceObjecttrackBodyConsumedtrackStreamConsumedCloseControllerweb_on_close_namespaceObjectgetEdgePreviewPropsget_edge_preview_props_namespaceObjectgetBuiltinRequestContextNEXT_REQUEST_CONTEXT_SYMBOLcreateLocalRequestContextbuiltin_request_context_namespaceObjectgetDerivedTagscreateTagsExpirationsByCacheKindgetImplicitTagsimplicit_tags_namespaceObjectisRSCRequestHeaderis_rsc_request_namespaceObjectNextRequestHintheadersGetterpropagatortestApisInterceptedensureTestApisInterceptedadapteradapter_namespaceObjectua_parserua_parser_namespaceObjectua_parser_defaultisBotuserAgentFromStringuserAgentuser_agent_namespaceObjectGlobalURLPatternurl_pattern_namespaceObjectafterafter_namespaceObjectserver_after_namespaceObjectreact_react_serverreact_react_server_namespaceObjectreact_react_server_defaulthooks_server_context_DynamicServerErrorhooks_server_context_namespaceObjectstatic_generation_bailout_StaticGenBailoutErrorstatic_generation_bailout_namespaceObjectisHangingPromiseRejectionErrorHANGING_PROMISE_REJECTIONHangingPromiseRejectionErrorabortListenersBySignaldynamic_rendering_utils_makeHangingPromiseignoreReject3dynamic_rendering_utils_namespaceObjectboundary_constants_namespaceObjectbailout_to_csr_BailoutToCSRErrorbailout_to_csr_namespaceObjectdynamic_rendering_throwToInterruptStaticGenerationdynamic_rendering_trackDynamicDataInDynamicRenderdynamic_rendering_postponeWithTracking dynamic_rendering_namespaceObject!"#utils_isRequestAPICallableInsideAfterrequest_utils_namespaceObject*connection_namespaceObject,reflect_utils_describeStringPropertyAccess/reflect_utils_wellKnownPropertiesreflect_utils_namespaceObjectactionAsyncStorageInstanceaction_async_storage_instance_namespaceObjectaction_async_storage_external_namespaceObject_globalThisxstdoutenabledreplaceCloseformatterpicocolors_resetbolddimitalicunderlineinversepicocolors_hiddenstrikethroughblackredgreenyellowbluemagentapurplecyanwhitegraybgBlackbgRedbgGreenbgYellowbgBluebgMagentabgCyanbgWhitepicocolors_namespaceObjectprefixesLOGGING_METHODprefixedLogbootstrapwaitwarnreadylog_eventlog_tracewarnOnceCachelog_warnOncelog_namespaceObject root_params_namespaceObjectexports_namespaceObjectserver_namespaceObjectmiddleware_namespaceObject)-/http_access_fallback_isHTTPAccessFallbackError23http_access_fallback_namespaceObjectredirect_status_code_RedirectStatusCoderedirect_status_code_namespaceObject23redirect_error_isRedirectErrorredirect_error_namespaceObject8is_next_router_error_namespaceObjectmodhandlerpageerrorHandledHandlernHandlernext_middleware_loaderabsolutePagePath_private_next_root_dir_2Fsrc_2Fmiddleware_js_page_2Fsrc_2Fmiddleware_rootDir_C_3A_5CUsers_5Cabd_b_5COneDrive_5CDesktop_5CCOSMIC_20AI_Risk_20Dashboard_5CStep_2012_20is_20complete_20Final_20QA_2C_20Demo_20Readiness_2C_20and_20Submission_20Freeze_5Capplication_5Csaas_app_matchers_W3sicmVnZXhwIjoiXig_2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg_2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw_2FXSs_2FKSkqKSk_2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10_2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0_3D_preferredRegion_middlewareConfig_eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig_2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg_2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw_2FXSs_2FKSkqKSk_2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10_2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19_namespaceObject __webpack_require__.d__webpack_require__.r__webpack_require__.g__webpack_require____webpack_require__.n +5webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSource`webpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceV(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[550],{ /***/ 165: webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource >webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceS/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceK/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceg"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { handleFetch: null, interceptFetch: null, reader: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { handleFetch: function() { return handleFetch; }, interceptFetch: function() { return interceptFetch; }, reader: function() { return reader; } }); const _context = require("./context"); const reader = { url (req) { return req.url; }, header (req, name) { return req.headers.get(name); } }; function getTestStack() { let stack = (new Error().stack ?? '').split('\n'); // Skip the first line and find first non-empty line. for(let i = 1; i < stack.length; i++){ if (stack[i].length > 0) { stack = stack.slice(i); break; } } // Filter out franmework lines. stack = stack.filter((f)=>!f.includes('/next/dist/')); // At most 5 lines. stack = stack.slice(0, 5); // Cleanup some internal info and trim. stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); return stack.join(' '); } async function buildProxyRequest(testData, request) { const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; return { testData, api: 'fetch', request: { url, method, headers: [ ...Array.from(headers), [ 'next-test-stack', getTestStack() ] ], body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } }; } function buildResponse(proxyResponse) { const { status, headers, body } = proxyResponse.response; return new Response(body ? Buffer.from(body, 'base64') : null, { status, headers: new Headers(headers) }); } async function handleFetch(originalFetch, request) { const testInfo = (0, _context.getTestReqInfo)(request, reader); if (!testInfo) { // Passthrough non-test requests. return originalFetch(request); } const { testData, proxyPort } = testInfo; const proxyRequest = await buildProxyRequest(testData, request); const resp = await originalFetch(`http://localhost:${proxyPort}`, { method: 'POST', body: JSON.stringify(proxyRequest), next: { // @ts-ignore internal: true } }); if (!resp.ok) { throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { value: "E146", enumerable: false, configurable: true }); } const proxyResponse = await resp.json(); const { api } = proxyResponse; switch(api){ case 'continue': return originalFetch(request); case 'abort': case 'unhandled': throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { value: "E145", enumerable: false, configurable: true }); case 'fetch': return buildResponse(proxyResponse); default: return api; } } function interceptFetch(originalFetch) { global.fetch = function testFetch(input, init) { var _init_next; // Passthrough internal requests. // @ts-ignore if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { return originalFetch(input, init); } return handleFetch(originalFetch, new Request(input, init)); }; return ()=>{ global.fetch = originalFetch; }; } //# sourceMappingURL=fetch.js.mapZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middleware e :NNWL/57A#Object.defineProperty(exports, "__esModule", ())0__webpack_require__392Buffer__webpack_require__.gbuffersourcesizemapshasht/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { handleFetch: function() { return handleFetch; }, interceptFetch: function() { return interceptFetch; }, reader: function() { return reader; } }); const _context = __webpack_require__(392); const reader = { url (req) { return req.url; }, header (req, name) { return req.headers.get(name); } }; function getTestStack() { let stack = (new Error().stack ?? '').split('\n'); // Skip the first line and find first non-empty line. for(let i = 1; i < stack.length; i++){ if (stack[i].length > 0) { stack = stack.slice(i); break; } } // Filter out franmework lines. stack = stack.filter((f)=>!f.includes('/next/dist/')); // At most 5 lines. stack = stack.slice(0, 5); // Cleanup some internal info and trim. stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); return stack.join(' '); } async function buildProxyRequest(testData, request) { const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; return { testData, api: 'fetch', request: { url, method, headers: [ ...Array.from(headers), [ 'next-test-stack', getTestStack() ] ], body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } }; } function buildResponse(proxyResponse) { const { status, headers, body } = proxyResponse.response; return new Response(body ? Buffer.from(body, 'base64') : null, { status, headers: new Headers(headers) }); } async function handleFetch(originalFetch, request) { const testInfo = (0, _context.getTestReqInfo)(request, reader); if (!testInfo) { // Passthrough non-test requests. return originalFetch(request); } const { testData, proxyPort } = testInfo; const proxyRequest = await buildProxyRequest(testData, request); const resp = await originalFetch(`http://localhost:${proxyPort}`, { method: 'POST', body: JSON.stringify(proxyRequest), next: { // @ts-ignore internal: true } }); if (!resp.ok) { throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { value: "E146", enumerable: false, configurable: true }); } const proxyResponse = await resp.json(); const { api } = proxyResponse; switch(api){ case 'continue': return originalFetch(request); case 'abort': case 'unhandled': throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { value: "E145", enumerable: false, configurable: true }); case 'fetch': return buildResponse(proxyResponse); default: return api; } } function interceptFetch(originalFetch) { __webpack_require__.g.fetch = function testFetch(input, init) { var _init_next; // Passthrough internal requests. // @ts-ignore if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { return originalFetch(input, init); } return handleFetch(originalFetch, new Request(input, init)); }; return ()=>{ __webpack_require__.g.fetch = originalFetch; }; } //# sourceMappingURL=fetch.js.map {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesx;AAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAIL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,GAAW;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sGAAsG;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC,+BAA+B,MAAM;AACrC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA,yDAAyD,UAAU;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uEAAuE,YAAY;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,4EAA4E,gBAAgB,EAAE,YAAY;AAC1G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAM;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAM;AACd;AACA;;AAEAZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middlewareg"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { handleFetch: null, interceptFetch: null, reader: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { handleFetch: function() { return handleFetch; }, interceptFetch: function() { return interceptFetch; }, reader: function() { return reader; } }); const _context = require("./context"); const reader = { url (req) { return req.url; }, header (req, name) { return req.headers.get(name); } }; function getTestStack() { let stack = (new Error().stack ?? '').split('\n'); // Skip the first line and find first non-empty line. for(let i = 1; i < stack.length; i++){ if (stack[i].length > 0) { stack = stack.slice(i); break; } } // Filter out franmework lines. stack = stack.filter((f)=>!f.includes('/next/dist/')); // At most 5 lines. stack = stack.slice(0, 5); // Cleanup some internal info and trim. stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); return stack.join(' '); } async function buildProxyRequest(testData, request) { const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; return { testData, api: 'fetch', request: { url, method, headers: [ ...Array.from(headers), [ 'next-test-stack', getTestStack() ] ], body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } }; } function buildResponse(proxyResponse) { const { status, headers, body } = proxyResponse.response; return new Response(body ? Buffer.from(body, 'base64') : null, { status, headers: new Headers(headers) }); } async function handleFetch(originalFetch, request) { const testInfo = (0, _context.getTestReqInfo)(request, reader); if (!testInfo) { // Passthrough non-test requests. return originalFetch(request); } const { testData, proxyPort } = testInfo; const proxyRequest = await buildProxyRequest(testData, request); const resp = await originalFetch(`http://localhost:${proxyPort}`, { method: 'POST', body: JSON.stringify(proxyRequest), next: { // @ts-ignore internal: true } }); if (!resp.ok) { throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { value: "E146", enumerable: false, configurable: true }); } const proxyResponse = await resp.json(); const { api } = proxyResponse; switch(api){ case 'continue': return originalFetch(request); case 'abort': case 'unhandled': throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { value: "E145", enumerable: false, configurable: true }); case 'fetch': return buildResponse(proxyResponse); default: return api; } } function interceptFetch(originalFetch) { global.fetch = function testFetch(input, init) { var _init_next; // Passthrough internal requests. // @ts-ignore if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { return originalFetch(input, init); } return handleFetch(originalFetch, new Request(input, init)); }; return ()=>{ global.fetch = originalFetch; }; } //# sourceMappingURL=fetch.js.mapConcatSourceRawSourceK/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; ReplaceSourceOriginalSourcemwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871720undefined559565__webpack_require__undefined567577392undefined18131818Bufferundefined21892194Bufferundefined37283733__webpack_require__.gundefined41264131__webpack_require__.gundefined /***/ }) buffersourcesizemapshash/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { handleFetch: function() { return handleFetch; }, interceptFetch: function() { return interceptFetch; }, reader: function() { return reader; } }); const _context = __webpack_require__(392); const reader = { url (req) { return req.url; }, header (req, name) { return req.headers.get(name); } }; function getTestStack() { let stack = (new Error().stack ?? '').split('\n'); // Skip the first line and find first non-empty line. for(let i = 1; i < stack.length; i++){ if (stack[i].length > 0) { stack = stack.slice(i); break; } } // Filter out franmework lines. stack = stack.filter((f)=>!f.includes('/next/dist/')); // At most 5 lines. stack = stack.slice(0, 5); // Cleanup some internal info and trim. stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); return stack.join(' '); } async function buildProxyRequest(testData, request) { const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; return { testData, api: 'fetch', request: { url, method, headers: [ ...Array.from(headers), [ 'next-test-stack', getTestStack() ] ], body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } }; } function buildResponse(proxyResponse) { const { status, headers, body } = proxyResponse.response; return new Response(body ? Buffer.from(body, 'base64') : null, { status, headers: new Headers(headers) }); } async function handleFetch(originalFetch, request) { const testInfo = (0, _context.getTestReqInfo)(request, reader); if (!testInfo) { // Passthrough non-test requests. return originalFetch(request); } const { testData, proxyPort } = testInfo; const proxyRequest = await buildProxyRequest(testData, request); const resp = await originalFetch(`http://localhost:${proxyPort}`, { method: 'POST', body: JSON.stringify(proxyRequest), next: { // @ts-ignore internal: true } }); if (!resp.ok) { throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { value: "E146", enumerable: false, configurable: true }); } const proxyResponse = await resp.json(); const { api } = proxyResponse; switch(api){ case 'continue': return originalFetch(request); case 'abort': case 'unhandled': throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { value: "E145", enumerable: false, configurable: true }); case 'fetch': return buildResponse(proxyResponse); default: return api; } } function interceptFetch(originalFetch) { __webpack_require__.g.fetch = function testFetch(input, init) { var _init_next; // Passthrough internal requests. // @ts-ignore if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { return originalFetch(input, init); } return handleFetch(originalFetch, new Request(input, init)); }; return ()=>{ __webpack_require__.g.fetch = originalFetch; }; } //# sourceMappingURL=fetch.js.map /***/ }) {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesx;;;;AAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAIL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,GAAW;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sGAAsG;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC,+BAA+B,MAAM;AACrC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA,yDAAyD,UAAU;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uEAAuE,YAAY;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,4EAA4E,gBAAgB,EAAE,YAAY;AAC1G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAM;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAM;AACd;AACA;;AAEA,iCZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middlewareg"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { handleFetch: null, interceptFetch: null, reader: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { handleFetch: function() { return handleFetch; }, interceptFetch: function() { return interceptFetch; }, reader: function() { return reader; } }); const _context = require("./context"); const reader = { url (req) { return req.url; }, header (req, name) { return req.headers.get(name); } }; function getTestStack() { let stack = (new Error().stack ?? '').split('\n'); // Skip the first line and find first non-empty line. for(let i = 1; i < stack.length; i++){ if (stack[i].length > 0) { stack = stack.slice(i); break; } } // Filter out franmework lines. stack = stack.filter((f)=>!f.includes('/next/dist/')); // At most 5 lines. stack = stack.slice(0, 5); // Cleanup some internal info and trim. stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); return stack.join(' '); } async function buildProxyRequest(testData, request) { const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; return { testData, api: 'fetch', request: { url, method, headers: [ ...Array.from(headers), [ 'next-test-stack', getTestStack() ] ], body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } }; } function buildResponse(proxyResponse) { const { status, headers, body } = proxyResponse.response; return new Response(body ? Buffer.from(body, 'base64') : null, { status, headers: new Headers(headers) }); } async function handleFetch(originalFetch, request) { const testInfo = (0, _context.getTestReqInfo)(request, reader); if (!testInfo) { // Passthrough non-test requests. return originalFetch(request); } const { testData, proxyPort } = testInfo; const proxyRequest = await buildProxyRequest(testData, request); const resp = await originalFetch(`http://localhost:${proxyPort}`, { method: 'POST', body: JSON.stringify(proxyRequest), next: { // @ts-ignore internal: true } }); if (!resp.ok) { throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { value: "E146", enumerable: false, configurable: true }); } const proxyResponse = await resp.json(); const { api } = proxyResponse; switch(api){ case 'continue': return originalFetch(request); case 'abort': case 'unhandled': throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { value: "E145", enumerable: false, configurable: true }); case 'fetch': return buildResponse(proxyResponse); default: return api; } } function interceptFetch(originalFetch) { global.fetch = function testFetch(input, init) { var _init_next; // Passthrough internal requests. // @ts-ignore if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { return originalFetch(input, init); } return handleFetch(originalFetch, new Request(input, init)); }; return ()=>{ global.fetch = originalFetch; }; } //# sourceMappingURL=fetch.js.map ConcatSourceRawSourceS/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; K/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; ReplaceSourceOriginalSourcemwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871720undefined559565__webpack_require__undefined567577392undefined18131818Bufferundefined21892194Bufferundefined37283733__webpack_require__.gundefined41264131__webpack_require__.gundefined RawSource /***/ }), /***/ 208:   webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSource@webpack/lib/util/registerExternalSerializerwebpack-sources/RawSource// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceexport async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } export async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; export function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (process.env.NEXT_RUNTIME !== 'edge') { return; } // The condition is true when the "process" module is provided if (process !== global.process) { // prefer local process but global.process has correct "env" process.env = global.process.env; global.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middlewareM   j o false{}__webpack_require__.gbuffersourcesizemapshashasync function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (false) {} // The condition is true when the "process" module is provided if (process !== __webpack_require__.g.process) { // prefer local process but global.process has correct "env" process.env = __webpack_require__.g.process.env; __webpack_require__.g.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.map {"finalSource":false}mapbufferedMapversionfilemappingssourcessourcesContentnamesxAAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEAUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middlewareexport async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } export async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; export function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (process.env.NEXT_RUNTIME !== 'edge') { return; } // The condition is true when the "process" module is provided if (process !== global.process) { // prefer local process but global.process has correct "env" process.env = global.process.env; global.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.mapReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware06undefined924930undefined15491555undefined32863320falseundefined33233345{}undefined34343439__webpack_require__.gundefined35433548__webpack_require__.gundefined35713576__webpack_require__.gundefined6 ;// ./node_modules/next/dist/esm/server/web/error.js  ewebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceSexport class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } export class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } export class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.mapSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewareC`fFL>class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map xAAAO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEASwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewareSexport class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } export class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } export class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map|webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware06undefined352358undefined582588undefined3 ;// ./node_modules/next/dist/esm/lib/constants.js  1&webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; export const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; export const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; export const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; export const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; export const MATCHED_PATH_HEADER = 'x-matched-path'; export const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; export const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; export const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; export const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; export const RSC_SEGMENT_SUFFIX = '.segment.rsc'; export const RSC_SUFFIX = '.rsc'; export const ACTION_SUFFIX = '.action'; export const NEXT_DATA_SUFFIX = '.json'; export const NEXT_META_SUFFIX = '.meta'; export const NEXT_BODY_SUFFIX = '.body'; export const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; export const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; export const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; export const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well export const NEXT_CACHE_TAG_MAX_ITEMS = 128; export const NEXT_CACHE_TAG_MAX_LENGTH = 256; export const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; export const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds export const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. export const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files export const MIDDLEWARE_FILENAME = 'middleware'; export const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`; // Pattern to detect instrumentation hooks file export const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias export const PAGES_DIR_ALIAS = 'private-next-pages'; export const DOT_NEXT_ALIAS = 'private-dot-next'; export const ROOT_DIR_ALIAS = 'private-next-root-dir'; export const APP_DIR_ALIAS = 'private-next-app-dir'; export const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; export const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; export const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; export const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; export const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; export const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; export const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`; export const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`; export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`; export const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`; export const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`; export const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`; export const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; export const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; export const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.'; export const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`; export const NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`; export const SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`; export const ESLINT_DEFAULT_DIRS = [ 'app', 'pages', 'components', 'lib', 'src' ]; export const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; export { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }; //# sourceMappingURL=constants.js.mapPwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middlewaredO= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ export function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ export function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ export function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.mapSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware`^Mflfl<__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._K /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ function normalizeNextQueryParam(key) { const prefixes = [ __WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__._, __WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._ ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map xKAAA+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,yDAAyD;AACzD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN,mEAAmE,YAAY;AAC/E;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA,QAAQ,8GAAuB;AAC/B,QAAQ,8HAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEASwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middlewareimport { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants'; /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ export function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ export function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ export function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ export function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware094undefined447453undefined16891695undefined39423948undefined47104716undefined52955301undefined53735395__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__._undefined54065436__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._undefinedC{pNEXT_QUERY_PARAM_PREFIXNEXT_INTERCEPTION_MARKER_PREFIXK ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js  q webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { PageSignatureError } from '../error'; const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } export function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } export class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.maphwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware`-G`fM^ __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._8 const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.map xAAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gHAAgH;AAChH;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEAhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware import { PageSignatureError } from '../error'; const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } export function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } export class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware045undefined14491455undefined16321638undefined21252142__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined25292546__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefinedCt Z PageSignatureErrorJ ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map gwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js|middleware{"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,AAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAAA,AAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0],"file":"x"}function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map xAAEO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,KAAM,gBAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,QACjDC,gBAAAA,KAAKK,OAAAA,KAAO,gBAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACFwebpack://../../../../src/shared/lib/i18n/detect-domain-locale.tsimport type { DomainLocale } from '../../../server/config-shared' export function detectDomainLocale( domainItems?: readonly DomainLocale[], hostname?: string, detectedLocale?: string ) { if (!domainItems) return if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase() } for (const item of domainItems) { // remove port if present const domainHostname = item.domain?.split(':', 1)[0].toLowerCase() if ( hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale) ) { return item } } } ` detectDomainLocaledomainItemshostnamedetectedLocaletoLowerCaseitemdomainHostnamedomainsplitdefaultLocalelocalessomelocaleReplaceSourceSourceMapSourceexport function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,AAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAAA,AAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0],"file":"x"}false06undefinedS ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceL/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map pwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js|middleware\{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0],"file":"x"}AzE/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map {~xRAAAA;;;;;;CAMC,GACM,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrCwebpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route: string) { return route.replace(/\/$/, '') || '/' } removeTrailingSlashroutereplaceL/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map \{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0],"file":"x"}false191197undefinedH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js  _ webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceI/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0],"file":"x"}AdB/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ehoxAAAA;;;;CAIC,GACM,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/Cwebpack://../../../../../src/shared/lib/router/utils/parse-path.ts/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path: string) { const hashIndex = path.indexOf('#') const queryIndex = path.indexOf('?') const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex) if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '', } } return { pathname: path, query: '', hash: '' } } ` parsePathpathhashIndexindexOfqueryIndexhasQuerypathnamesubstringqueryundefinedSsliceI/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0],"file":"x"}false207213undefinedM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { parsePath } from './parse-path'; /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map jwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;CAGC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0],"file":"x"}`(C?G__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._F /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = __WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map GJQxAAAwC;AAExC;;;CAGC,GACM,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,uFAASA,CAACE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxCwebpack://../../../../../src/shared/lib/router/utils/add-path-prefix.tsimport { parsePath } from './parse-path' /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path: string, prefix?: string) { if (!path.startsWith('/') || !prefix) { return path } const { pathname, query, hash } = parsePath(path) return `${prefix}${pathname}${query}${hash}` } addPathPrefixprefixstartsWith<import { parsePath } from './parse-path'; /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;CAGC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined164170undefined319327__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefinedAeM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js  =webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { parsePath } from './parse-path'; /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map jwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;CAIC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0],"file":"x"}`(Cy__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._0 /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = __WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map 14;xAAAwC;AAExC;;;;CAIC,GACM,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,uFAASA,CAACE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxCwebpack://../../../../../src/shared/lib/router/utils/add-path-suffix.tsimport { parsePath } from './parse-path' /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path: string, suffix?: string) { if (!path.startsWith('/') || !suffix) { return path } const { pathname, query, hash } = parsePath(path) return `${pathname}${suffix}${query}${hash}` } ̍addPathSuffix̆suffix'import { parsePath } from './parse-path'; /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;CAIC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined222228undefined377385__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefinedAIM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceSimport { parsePath } from './parse-path'; /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map jwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,UAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0],"file":"x"}`(CHN__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._q /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = __WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map &xAAAwC;AAExC;;;;;;CAMC,GACM,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,uFAASA,CAACE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7Dwebpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts)import { parsePath } from './parse-path' /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path: string, prefix: string) { if (typeof path !== 'string') { return false } const { pathname } = parsePath(path) return pathname === prefix || pathname.startsWith(prefix + '/') } pathHasPrefixSimport { parsePath } from './parse-path'; /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,UAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0],"file":"x"}false040undefined328334undefined463471__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefinedAH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { addPathPrefix } from './add-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map ewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AAEjD;;;;CAIC,GACD,OAAO,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,cAAcM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,cAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,cAAcG,MAAO,MAAGC;AACjC","ignoreList":[0],"file":"x"}b13dGQW 6B__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._ /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(lower, '/api')) return path; if (__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return __WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map  xAAAiD;AACA;AAEjD;;;;CAIC,GACM,SAASE,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,gGAAaA,CAACM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,gGAAaA,CAACM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,+FAAaA,CAACG,MAAO,MAAGC;AACjCwebpack://../../../../../src/shared/lib/router/utils/add-locale.tsimport { addPathPrefix } from './add-path-prefix' import { pathHasPrefix } from './path-has-prefix' /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale( path: string, locale?: string | false, defaultLocale?: string, ignorePrefix?: boolean ) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path const lower = path.toLowerCase() // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path } // Add the locale prefix to the path. return addPathPrefix(path, `/${locale}`) }  addLocalewtignorePrefixlowermvimport { addPathPrefix } from './add-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AAEjD;;;;CAIC,GACD,OAAO,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,cAAcM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,cAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,cAAcG,MAAO,MAAGC;AACjC","ignoreList":[0],"file":"x"}zfalse049undefined51100undefined337343undefined767779__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined822834__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined944956__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefinedE}IW ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { removeTrailingSlash } from './remove-trailing-slash'; import { addPathPrefix } from './add-path-prefix'; import { addPathSuffix } from './add-path-suffix'; import { addLocale } from './add-locale'; export function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map twebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js|middleware/{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;AAOxC,OAAO,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,UACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,oBAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,cACTD,cAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,cAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,cAAcI,UAAU,OACxBA,WACFN,oBAAoBM;AAC1B","ignoreList":[0],"file":"x"}e =?prR & 5G__WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._ function formatNextPathnameInfo(info) { let pathname = __WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__._(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = __WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._(pathname); } if (info.buildId) { pathname = __WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = __WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? __WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._(pathname, '/') : pathname : __WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map x%AAC6D;AACZ;AACA;AACT;AAOjC,SAASI,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,wFAASA,CACtBE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,2GAAmBA,CAACM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,+FAAaA,CACtBD,+FAAaA,CAACK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,+FAAaA,CAACK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,+FAAaA,CAACI,UAAU,OACxBA,WACFN,2GAAmBA,CAACM;AAC1Bwebpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts+import type { NextPathnameInfo } from './get-next-pathname-info' import { removeTrailingSlash } from './remove-trailing-slash' import { addPathPrefix } from './add-path-prefix' import { addPathSuffix } from './add-path-suffix' import { addLocale } from './add-locale' interface ExtendedInfo extends NextPathnameInfo { defaultLocale?: string ignorePrefix?: boolean } export function formatNextPathnameInfo(info: ExtendedInfo) { let pathname = addLocale( info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix ) if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname) } if (info.buildId) { pathname = addPathSuffix( addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json' ) } pathname = addPathPrefix(pathname, info.basePath) return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname) } `wformatNextPathnameInfoinfo`buildId\trailingSlashbasePathendsWith]import { removeTrailingSlash } from './remove-trailing-slash'; import { addPathPrefix } from './add-path-prefix'; import { addPathSuffix } from './add-path-suffix'; import { addLocale } from './add-locale'; export function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map /{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;AAOxC,OAAO,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,UACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,oBAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,cACTD,cAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,cAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,cAAcI,UAAU,OACxBA,WACFN,oBAAoBM;AAC1B","ignoreList":[0],"file":"x"}_false061undefined63112undefined114163undefined165205undefined207213undefined273281__WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__._undefined444462__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined524536__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined538550__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined664676__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined779791__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined821839__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined`?L9?Ao4Rgg= ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource/** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map Zwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/get-hostname.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,AAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0],"file":"x"}A/** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map x\AAEA;;;;;CAKC,GACM,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,KAAQ,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7Bwebpack://../../../src/shared/lib/get-hostname.tsimport type { OutgoingHttpHeaders } from 'http' /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname( parsed: { hostname?: string | null }, headers?: OutgoingHttpHeaders ): string | undefined { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname: string if (headers?.host && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0] } else if (parsed.hostname) { hostname = parsed.hostname } else return return hostname.toLowerCase() }  getHostnameparsedheaders:C/** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,AAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0],"file":"x"}false274280undefinedK ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js  swebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource/** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map hwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js|middleware {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":"AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0],"file":"x"}A"/** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map xAAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACM,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpCwebpack://../../../../src/shared/lib/i18n/normalize-locale-path.tsexport interface PathLocale { detectedLocale?: string pathname: string } /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap() /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath( pathname: string, locales?: readonly string[] ): PathLocale { // If locales is undefined, return the pathname as is. if (!locales) return { pathname } // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales) if (!lowercasedLocales) { lowercasedLocales = locales.map((locale) => locale.toLowerCase()) cache.set(locales, lowercasedLocales) } let detectedLocale: string | undefined // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2) // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname } // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase() // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment) if (index < 0) return { pathname } // Return the case-sensitive locale. detectedLocale = locales[index] // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/' return { pathname, detectedLocale } } `cacheWeakMapnormalizeLocalePath]*lowercasedLocalesget*"set segments$segmentindexT[length&/** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map  {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":"AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0],"file":"x"}false540546undefinedP ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource6import { pathHasPrefix } from './path-has-prefix'; /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map mwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js|middleware{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AAEjD;;;;;;;CAOC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,cAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACb","ignoreList":[0],"file":"x"}`1Chn(__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._P /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map xAAAiD;AAEjD;;;;;;;CAOC,GACM,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,gGAAaA,CAACE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACbwebpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.tsimport { pathHasPrefix } from './path-has-prefix' /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path: string, prefix: string): string { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length) // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return `/${withoutPrefix}` } removePathPrefix=[withoutPrefixE[6import { pathHasPrefix } from './path-has-prefix'; /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AAEjD;;;;;;;CAOC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,cAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACb","ignoreList":[0],"file":"x"}false049undefined360366undefined796808__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefinedABzT ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js  k webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcenimport { normalizeLocalePath } from '../../i18n/normalize-locale-path'; import { removePathPrefix } from './remove-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; export function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map qwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js|middleware_{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aAAa,QAAQ,oBAAmB;AAkDjD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAAgB;QAE0BA;IAA1C,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,CAAAA,sBAAAA,QAAQI,UAAAA,AAAU,KAAA,OAAlBJ,sBAAsB,CAAC;IACjE,MAAMK,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAAMA,SAASO,QAAQ,CAAC,OAAOH;IAC7D;IAEA,IAAIF,YAAYJ,cAAcQ,KAAKN,QAAQ,EAAEE,WAAW;QACtDI,KAAKN,QAAQ,GAAGH,iBAAiBS,KAAKN,QAAQ,EAAEE;QAChDI,KAAKJ,QAAQ,GAAGA;IAClB;IACA,IAAIM,uBAAuBF,KAAKN,QAAQ;IAExC,IACEM,KAAKN,QAAQ,CAACS,UAAU,CAAC,mBACzBH,KAAKN,QAAQ,CAACO,QAAQ,CAAC,UACvB;QACA,MAAMG,QAAQJ,KAAKN,QAAQ,CACxBW,OAAO,CAAC,oBAAoB,IAC5BA,OAAO,CAAC,WAAW,IACnBC,KAAK,CAAC;QAET,MAAMC,UAAUH,KAAK,CAAC,EAAE;QACxBJ,KAAKO,OAAO,GAAGA;QACfL,uBACEE,KAAK,CAAC,EAAE,KAAK,UAAW,MAAGA,MAAMI,KAAK,CAAC,GAAGC,IAAI,CAAC,OAAS;QAE1D,sDAAsD;QACtD,kDAAkD;QAClD,IAAId,QAAQe,SAAS,KAAK,MAAM;YAC9BV,KAAKN,QAAQ,GAAGQ;QAClB;IACF;IAEA,4EAA4E;IAC5E,yBAAyB;IACzB,IAAIL,MAAM;QACR,IAAIc,SAAShB,QAAQiB,YAAY,GAC7BjB,QAAQiB,YAAY,CAACC,OAAO,CAACb,KAAKN,QAAQ,IAC1CJ,oBAAoBU,KAAKN,QAAQ,EAAEG,KAAKiB,OAAO;QAEnDd,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACnBL;QAAhBX,KAAKN,QAAQ,GAAGiB,CAAAA,mBAAAA,OAAOjB,QAAAA,AAAQ,KAAA,OAAfiB,mBAAmBX,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,wBAC7BZ,oBAAoBY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0],"file":"x"}bFHK$Zis__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._ function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && __WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._(info.pathname, basePath)) { info.pathname = __WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__._(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : __WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : __WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map xOAAAsE;AACf;AACN;AAkD1C,SAASG,oBACdC,QAAgB,EAChBC,OAAgB;QAE0BA;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KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,wBAC7BZ,4GAAmBA,CAACY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACTwebpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts[ import { normalizeLocalePath } from '../../i18n/normalize-locale-path' import { removePathPrefix } from './remove-path-prefix' import { pathHasPrefix } from './path-has-prefix' import type { I18NProvider } from '../../../../server/lib/i18n-provider' export interface NextPathnameInfo { /** * The base path in case the pathname included it. */ basePath?: string /** * The buildId for when the parsed URL is a data URL. Parsing it can be * disabled with the `parseData` option. */ buildId?: string /** * If there was a locale in the pathname, this will hold its value. */ locale?: string /** * The processed pathname without a base path, locale, or data URL elements * when parsing it is enabled. */ pathname: string /** * A boolean telling if the pathname had a trailingSlash. This can be only * true if trailingSlash is enabled. */ trailingSlash?: boolean } interface Options { /** * When passed to true, this function will also parse Nextjs data URLs. */ parseData?: boolean /** * A partial of the Next.js configuration to parse the URL. */ nextConfig?: { basePath?: string i18n?: { locales?: readonly string[] } | null trailingSlash?: boolean } /** * If provided, this normalizer will be used to detect the locale instead of * the default locale detection. */ i18nProvider?: I18NProvider } export function getNextPathnameInfo( pathname: string, options: Options ): NextPathnameInfo { const { basePath, i18n, trailingSlash } = options.nextConfig ?? {} const info: NextPathnameInfo = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash, } if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath) info.basePath = basePath } let pathnameNoDataPrefix = info.pathname if ( info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json') ) { const paths = info.pathname .replace(/^\/_next\/data\//, '') .replace(/\.json$/, '') .split('/') const buildId = paths[0] info.buildId = buildId pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/' // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales) info.locale = result.detectedLocale info.pathname = result.pathname ?? info.pathname if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales) if (result.detectedLocale) { info.locale = result.detectedLocale } } } return info } `qgetNextPathnameInfo-optionsi18nnextConfigpathnameNoDataPrefixCpaths,joinparseDataresulti18nProvideranalyzenimport { normalizeLocalePath } from '../../i18n/normalize-locale-path'; import { removePathPrefix } from './remove-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; export function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map _{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aAAa,QAAQ,oBAAmB;AAkDjD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAAgB;QAE0BA;IAA1C,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,CAAAA,sBAAAA,QAAQI,UAAAA,AAAU,KAAA,OAAlBJ,sBAAsB,CAAC;IACjE,MAAMK,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAA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E1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0],"file":"x"}false070undefined72127undefined129178undefined180186undefined536548__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined602617__WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__._undefined15261544__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined19071925__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefinedG`ZR(\9 ;// ./node_modules/next/dist/esm/server/web/next-url.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'; import { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'; import { getHostname } from '../../shared/lib/get-hostname'; import { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'; const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); export class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.mapVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware aOQPJ*W __WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined__WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._n const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = __WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !undefined, i18nProvider: this[Internal].options.i18nProvider }); const hostname = __WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__._(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : __WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__._((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return __WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.map oryxTAAAgF;AACiB;AACrC;AAC+B;AAC3F,qGAAqG,EAAE;AACvG;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4GAAmB;AACxC;AACA,wBAAwB,SAA8C;AACtE;AACA,SAAS;AACT,yBAAyB,4FAAW;AACpC,+IAA+I,yGAAkB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kHAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middlewareimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'; import { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'; import { getHostname } from '../../shared/lib/get-hostname'; import { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'; const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); export class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.mapzwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware079undefined81177undefined179238undefined240330undefined683689undefined14441462__WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined15781623undefinedundefined17251735__WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__._undefined19331950__WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__._undefined29853006__WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefinedGU+6 u // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceexport { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies'; //# sourceMappingURL=cookies.js.mapdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware`k]% //# sourceMappingURL=cookies.js.map ^ahx AAA4G;;AAE5Gdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middlewareexport { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies'; //# sourceMappingURL=cookies.js.mapiqwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware0107undefinedG ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { RemovedUAError, RemovedPageError } from '../error'; import { RequestCookies } from './cookies'; export const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ export class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (process.env.NEXT_RUNTIME !== 'edge') { if (init.body && init.duplex !== 'half') { init.duplex = 'half'; } } if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new RequestCookies(this.headers), nextUrl, url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.mapdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middlewaree%'hjZ`P _ 3 @ __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._false{}__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._ false0__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._L const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (false) {} if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(url, { headers: __WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new __WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._(this.headers), nextUrl, url: false ? 0 : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new __WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__._(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new __WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.map MPWxAAAsC;AAC4B;AACN;AACjB;AACpC;AACP;AACA;AACA;AACA;AACA,IAAW;AACX,gCAAgC;AAChC;AACA,QAAQ,2FAAW;AACnB;AACA;AACA;AACA;AACA,YAAY,KAAmC,EAAE,EAIxC;AACT;AACA;AACA,4BAA4B,+EAAO;AACnC,qBAAqB,uHAAyB;AAC9C;AACA,SAAS;AACT;AACA,yBAAyB,6FAAc;AACvC;AACA,iBAAiB,MAA8C,GAAG,CAAG;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gGAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4FAAc;AAChC;AACA;AACA;AACA;AACA;;AAEAdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { RemovedUAError, RemovedPageError } from '../error'; import { RequestCookies } from './cookies'; export const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ export class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (process.env.NEXT_RUNTIME !== 'edge') { if (init.body && init.duplex !== 'half') { init.duplex = 'half'; } } if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new RequestCookies(this.headers), nextUrl, url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.mapXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware037undefined39104undefined106165undefined167209undefined211217undefined520526undefined699709__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined9661000falseundefined10031120{}undefined12391245__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined12751299__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined14211434__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined14891534 falseundefined153815400undefined26402655__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__._undefined28672880__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._undefinedK8$p [ / validateURLNextURLtoNodeOutgoingHttpHeaders_edge_runtime_cookies.RequestCookiesRemovedPageErrorRemovedUAErrorP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js  \webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceEexport class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.mapmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware5>class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map 69@x_AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middlewareEexport class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.mapAxwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware06undefinedH ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js  Awebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource|import { stringifyCookie } from '../../web/spec-extension/cookies'; import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { ReflectAdapter } from './adapters/reflect'; import { ResponseCookies } from './cookies'; const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ export class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.mapewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middlewareeBDikV|(6#1 Zd__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._$ const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>__WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__._(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(init.url, { headers: __WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', __WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map %(/x*AAAmE;AAC7B;AAC4B;AACd;AACR;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX,+BAA+B;AAC/B;AACA;AACA,4BAA4B,+FAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,+FAAe;AACrE,yGAAyG,oGAAe;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA,gCAAgC,+EAAO;AACvC,yBAAyB,uHAAyB;AAClD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gCAAgC,2FAAW;AAC3C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,4CAA4C,2FAAW;AACvD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEAewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware|import { stringifyCookie } from '../../web/spec-extension/cookies'; import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { ReflectAdapter } from './adapters/reflect'; import { ResponseCookies } from './cookies'; const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ export class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map08webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware066undefined68105undefined107172undefined174225undefined227270undefined14041410undefined15761590__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined20832097__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined22072221__WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__._undefined25152528__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined26982704__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined27432767__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined41864196__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined44864496__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefinedb Sta- b j  ) *response_INTERNALS_edge_runtime_cookies.ResponseCookies(0,_edge_runtime_cookies.stringifyCookie)ReflectAdapterL ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceS/** * The result of parsing a URL relative to a base URL. */ export function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js|middlewareD{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD,OAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0],"file":"x"}a?EAE/** * The result of parsing a URL relative to a base URL. */ function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map xAAAA;;CAEC,GAaM,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACM,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrBwebpack://../../../../../src/shared/lib/router/utils/relativize-url.tsG/** * The result of parsing a URL relative to a base URL. */ export type RelativeURL = { /** * The relative URL. Either a URL including the origin or a relative URL. */ url: string /** * Whether the URL is relative to the base URL. */ isRelative: boolean } export function parseRelativeURL( url: string | URL, base: string | URL ): RelativeURL { const baseURL = typeof base === 'string' ? new URL(base) : base const relative = new URL(url, base) // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative, } } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url: string | URL, base: string | URL): string { const relative = parseRelativeURL(url, base) return relative.url } ` parseRelativeURLurlbasebaseURLURLrelativeisRelativeorigin5RgetRelativeURLxS/** * The result of parsing a URL relative to a base URL. */ export function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map D{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD,OAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0],"file":"x"}!false6369undefined687693undefinedJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js  !webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map gwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/app-router-headers.js|middleware {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC","ignoreList":[0],"file":"x"}d!']%+lr7= IOconst RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map x)AAAO,MAAMA,aAAa,MAAc;AACjC,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AACxD,MAAMC,gCAAgC,yBAAiC;AACvE,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AACzB,MAAMC,sCACX,+BAAuC;AAClC,MAAMC,0BAA0B,mBAA2B;AAC3D,MAAMC,+BAA+B,4BAAoC;AACzE,MAAMC,WAAW,WAAmB;AACpC,MAAMC,0BAA0B,mBAA2B;AAE3D,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEH,MAAMM,uBAAuB,OAAe;AAE5C,MAAMC,gCAAgC,sBAA8B;AACpE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,6BAA6B,0BAAkC;AACrE,MAAMC,8BAA8B,2BAAmC;AACvE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,+BAA+B,4BAAoCwebpack://../../../src/client/components/app-router-headers.tsexport const RSC_HEADER = 'rsc' as const export const ACTION_HEADER = 'next-action' as const // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch' as const export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const export const NEXT_URL = 'next-url' as const export const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, ] as const export const NEXT_RSC_UNION_QUERY = '_rsc' as const export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const `RSC_HEADERACTION_HEADERNEXT_ROUTER_STATE_TREE_HEADERNEXT_ROUTER_PREFETCH_HEADERNEXT_ROUTER_SEGMENT_PREFETCH_HEADERNEXT_HMR_REFRESH_HEADERNEXT_HMR_REFRESH_HASH_COOKIENEXT_URLRSC_CONTENT_TYPE_HEADERFLIGHT_HEADERSNEXT_RSC_UNION_QUERYNEXT_ROUTER_STALE_TIME_HEADERNEXT_DID_POSTPONE_HEADERNEXT_REWRITTEN_PATH_HEADERNEXT_REWRITTEN_QUERY_HEADERNEXT_IS_PRERENDER_HEADERNEXT_ACTION_NOT_FOUND_HEADERTexport const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map  {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC","ignoreList":[0],"file":"x"} false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefinedA.app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE; ;// ./node_modules/next/dist/esm/server/internal-utils.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceBimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'; const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; export function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } export function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.mapXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middlewareaNsF __WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._ const INTERNAL_QUERY_NAMES = [ __WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._ ]; function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map xnAAA+E;AAC/E;AACA,IAAI,yGAAoB;AACxB;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA,iCAAiC,yGAAoB;AACrD;AACA;;AAEAXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middlewareBimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'; const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; export function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } export function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.maprwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middleware078undefined115134__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined139145undefined267273undefined453472__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined`$B%O ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource2/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map lwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js|middleware={"version":3,"sources":["webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3C","ignoreList":[0],"file":"x"}A+/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map xVAAAA;;;CAGC,GACM,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3Cwebpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path: string) { return path.startsWith('/') ? path : `/${path}` } ensureLeadingSlashYx.2/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ={"version":3,"sources":["webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3C","ignoreList":[0],"file":"x"}false159165undefined8 ;// ./node_modules/next/dist/esm/shared/lib/segment.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } export function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } export function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } export const PAGE_SEGMENT_KEY = '__PAGE__'; export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map Uwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/segment.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":"AAEA,OAAO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEA,OAAO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEA,OAAO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMQ,mBAAmB,WAAU;AAC1C,OAAO,MAAMI,sBAAsB,cAAa","ignoreList":[0],"file":"x"}Gcifunction isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } const PAGE_SEGMENT_KEY = '__PAGE__'; const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map xAAEO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEO,MAAMQ,mBAAmB,WAAU;AACnC,MAAMI,sBAAsB,cAAawebpack://../../../src/shared/lib/segment.ts@import type { Segment } from '../../server/app-render/types' export function isGroupSegment(segment: string) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')') } export function isParallelRouteSegment(segment: string) { return segment.startsWith('@') && segment !== '@children' } export function addSearchParamsIfPageSegment( segment: Segment, searchParams: Record ) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY) if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams) return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY } return segment } export const PAGE_SEGMENT_KEY = '__PAGE__' export const DEFAULT_SEGMENT_KEY = '__DEFAULT__' `isGroupSegmentisParallelRouteSegmentcaddSearchParamsIfPageSegmentsearchParamsisPageSegmentincludesPAGE_SEGMENT_KEYstringifiedQueryJSONstringifyDEFAULT_SEGMENT_KEYexport function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } export function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } export function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } export const PAGE_SEGMENT_KEY = '__PAGE__'; export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":"AAEA,OAAO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEA,OAAO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEA,OAAO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMQ,mBAAmB,WAAU;AAC1C,OAAO,MAAMI,sBAAsB,cAAa","ignoreList":[0],"file":"x"}Lfalse06undefined143149undefined258264undefined611617undefined655661undefinedG ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'; import { isGroupSegment } from '../../segment'; /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map dwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js|middleware {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","normalizeRscURL","url","replace"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,iBAAiBC,KAAa;IAC5C,OAAOH,mBACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,eAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAA,CAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACD,OAAO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0],"file":"x"}bIKyG 1IO__WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._ /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ function normalizeAppPath(route) { return __WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__._(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (__WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map xAAAyE;AAC3B;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACM,SAASE,iBAAiBC,KAAa;IAC5C,OAAOH,0GAAkBA,CACvBG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,kGAAcA,CAACM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,QAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACM,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA;AAGJwebpack://../../../../../src/shared/lib/router/utils/app-paths.tsimport { ensureLeadingSlash } from '../../page-path/ensure-leading-slash' import { isGroupSegment } from '../../segment' /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route: string) { return ensureLeadingSlash( route.split('/').reduce((pathname, segment, index, segments) => { // Empty segments are ignored. if (!segment) { return pathname } // Groups are ignored. if (isGroupSegment(segment)) { return pathname } // Parallel segments are ignored. if (segment[0] === '@') { return pathname } // The last segment (if it's a leaf) should be ignored. if ( (segment === 'page' || segment === 'route') && index === segments.length - 1 ) { return pathname } return `${pathname}/${segment}` }, '') ) } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url: string) { return url.replace( /\.rsc($|\?)/, // $1 ensures `?` is preserved '$1' ) } `normalizeAppPathreduce+normalizeRscURLzimport { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'; import { isGroupSegment } from '../../segment'; /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map  {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","normalizeRscURL","url","replace"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,iBAAiBC,KAAa;IAC5C,OAAOH,mBACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,eAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAA,CAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACD,OAAO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0],"file":"x"}+false073undefined75121undefined747753undefined800817__WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__._undefined10281041__WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._undefined16091615undefinedC =P ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js  (webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceJimport { ReflectAdapter } from './reflect'; /** * @internal */ export class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } export class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.mapmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middlewared *AGSKQFS ' * 7 =Jt__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._u /** * @internal */ class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map vyxAAA2C;AAC3C;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qFAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC,aAAa;AACb;AACA;AACA,2BAA2B,qFAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC,aAAa;AACb;AACA,qDAAqD,qFAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC,aAAa;AACb;AACA,qDAAqD,qFAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qFAAc;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middlewareJimport { ReflectAdapter } from './reflect'; /** * @internal */ export class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } export class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map)webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middleware042undefined6571undefined331337undefined955968__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined16061619__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined17941807__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined23302343__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined24942507__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined31143127__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined32643277__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined39013914__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined44684481__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined QTW T 1IsTTTTTTTTTK ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|sharedElr#)dconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ehoxAAAA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|sharedconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.mappwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|shared876882undefined10591065undefined12391245undefinedAuasync_local_storage_createAsyncLocalStorageS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js  Mwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const workAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|sharedd?AGi__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._R const workAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=work-async-storage-instance.js.map SV]x AAAgE;AACzD,iCAAiC,oHAAuB;;AAE/Dwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|sharedimport { createAsyncLocalStorage } from './async-local-storage'; export const workAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map^ webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared063undefined6571undefined105127__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`"@S ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource$// Share the instance module in the next-shared layer import { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { workAsyncStorageInstance as workAsyncStorage }; //# sourceMappingURL=work-async-storage.external.js.map!webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared`6BAp// Share the instance module in the next-shared layer //# sourceMappingURL=work-async-storage.external.js.map BELxAAAA;AAGE;AACsD;;AAExD!webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared$// Share the instance module in the next-shared layer import { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { workAsyncStorageInstance as workAsyncStorage }; //# sourceMappingURL=work-async-storage.external.js.mapM>webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared54177undefined179234undefinedX ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { RequestCookies } from '../cookies'; import { ResponseCookies } from '../cookies'; import { ReflectAdapter } from './reflect'; import { workAsyncStorage } from '../../../app-render/work-async-storage.external'; /** * @internal */ export class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } export class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); export function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } export function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } export class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorage.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } export function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } export function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } export function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.mapuwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middlewaree+-Y[^6<qwY_FL & ~)6__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._0 /** * @internal */ class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = __WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); return wrappedCookies; } } function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return __WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._.get(target, prop, receiver); } } }); return wrappedCookies; } function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map 14;xAAA4C;AACC;AACF;AACwC;AACnF;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oCAAoC,+FAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yFAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,+FAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,+BAA+B,qFAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qFAAc;AACzC;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEAuwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middlewareimport { RequestCookies } from '../cookies'; import { ResponseCookies } from '../cookies'; import { ReflectAdapter } from './reflect'; import { workAsyncStorage } from '../../../app-render/work-async-storage.external'; /** * @internal */ export class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } export class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); export function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } export function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } export class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorage.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } export function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } export function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } export function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map<webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware043undefined4589undefined91133undefined135217undefined240246undefined566572undefined969982__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined11371143undefined13691375undefined21182124undefined22422256__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined25832598__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined30263040__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined47344747__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined48614867undefined56735686__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined57785784undefined63646370undefinedO^r8m  request_cookies_RequestCookiesAdapter workAsyncStorageInstance   request_cookies_responseCookiesToRequestCookies@ ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js  {webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceY/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user export const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set export const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); export { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, }; //# sourceMappingURL=constants.js.map]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middlewareE\1u/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); //# sourceMappingURL=constants.js.map  'x?AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA,CAAC,eAAe;AAChB;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACsN;;AAEtN]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middlewareY/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user export const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set export const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); export { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, }; //# sourceMappingURL=constants.js.map(webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middleware63946400undefined70877093undefined72607473undefinedCgnconstants_NodeSpan< ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceO/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map Ywebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/is-thenable.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0],"file":"x"}A H/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map  xrAAAA;;;;;CAKC,GACM,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5Bwebpack://../../../src/shared/lib/is-thenable.tsr/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable( promise: Promise | T ): promise is Promise { return ( promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function' ) } isThenablepromisethenyO/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0],"file":"x"}false136142undefined= ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js  m(webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource$import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'; import { isThenable } from '../../../shared/lib/is-thenable'; const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (process.env.NEXT_RUNTIME === 'edge') { api = require('@opentelemetry/api'); } else { try { api = require('@opentelemetry/api'); } catch (err) { api = require('next/dist/compiled/@opentelemetry/api'); } } const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; export class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } export function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); export { getTracer, SpanStatusCode, SpanKind }; //# sourceMappingURL=tracer.js.mapZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middlewarec HJVsyAXFOf$$true__webpack_require__817{}__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._{$ const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (true) { api = __webpack_require__(817); } else {} const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && __WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__._.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); //# sourceMappingURL=tracer.js.map xAAAyE;AACZ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAmC;AACvC,UAAU,mBAAO,CAAC,GAAoB;AACtC,EAAE,KAAK,EAMN;AACD,QAAQ,sEAAsE;AACvE;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,yGAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,yFAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B,QAAQ,oFAAoF;AACxK;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0FAAU;AAClC;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,yGAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC8C;;AAE/CZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware$import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'; import { isThenable } from '../../../shared/lib/is-thenable'; const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (process.env.NEXT_RUNTIME === 'edge') { api = require('@opentelemetry/api'); } else { try { api = require('@opentelemetry/api'); } catch (err) { api = require('next/dist/compiled/@opentelemetry/api'); } } const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; export class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } export function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); export { getTracer, SpanStatusCode, SpanKind }; //# sourceMappingURL=tracer.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware072undefined74134undefined674708trueundefined723729__webpack_require__undefined731750817undefined761908{}undefined9951001undefined11391145undefined36493672__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined48114826__WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__._undefined62146223__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined73247347__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined93189364undefinedI _ *<#$NextVanillaSpanAllowlistLogSpanAllowListtracer_getTracer< ;// ./node_modules/next/dist/esm/server/api-utils/index.js  jwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants'; import { getTracer } from '../lib/trace/tracer'; import { NodeSpan } from '../lib/trace/constants'; export function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ export function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ export function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } export function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } export const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; export const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; export const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; export const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); export const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); export function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = require('next/dist/compiled/cookie'); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ export class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ export function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ export function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middlewarecGI_"OUJP X U [ @ e r v  SYgm__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._(/* unused pure expression or super */ null && ())__webpack_require__663 true0"production"0 function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } function checkIsOnDemandRevalidate(req, previewProps) { const headers = __WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(req.headers); const previewModeId = headers.get(__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__._); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; const RESPONSE_LIMIT_DEFAULT = (/* unused pure expression or super */ null && (4 * 1024 * 1024)); const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = __webpack_require__(663); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map x)AAAwE;AACsC;AAC9D;AACE;AAC3C;AACP;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP,oBAAoB,qFAAc;AAClC,sCAAsC,sHAA2B;AACjE;AACA,gDAAgD,oJAA0C;AAC1F;AACA;AACA;AACA;AACA;AACO;AACA;AACA,+BAA+B,+DAAe;AAC9C;AACA;AACA,2CAA2C;AAClD;AACA;AACA;AACA,YAAY,YAAY,EAAE,mBAAO,CAAC,GAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW,uBAAuB,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEAYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middlewareimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants'; import { getTracer } from '../lib/trace/tracer'; import { NodeSpan } from '../lib/trace/constants'; export function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ export function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ export function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } export function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } export const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; export const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; export const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; export const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); export const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); export function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = require('next/dist/compiled/cookie'); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ export class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ export function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ export function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middleware071undefined73182undefined184231undefined233282undefined284290undefined703709undefined930936undefined16151621undefined16981711__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined17701796__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__._undefined19271968__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._undefined20562062undefined21222128undefined21872193undefined22252224(/* unused pure expression or super */ null && (undefined22402239))undefined22422248undefined23132319undefined23892395undefined25362542__webpack_require__undefined25442570663undefined31363173 trueundefined318631900undefined32133232"production"undefined37533790 trueundefined380338070undefined38303849"production"undefined41794185undefined44554461undefined47754781undefinedEnrHeadersAdapterPRERENDER_REVALIDATE_HEADERPRERENDER_REVALIDATE_ONLY_GENERATED_HEADERN ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js  d webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils'; export class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id')); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.mapkwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middlewaredVX^W,\uId __WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._ false0 true0"production"03 class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && __WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__._(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. false && 0)); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: __WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._, value: this._previewModeId, httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: __WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._, value: '', httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.map xAAAuF;AAChF;AACP;AACA;AACA;AACA;AACA,qDAAqD,wHAAyB;AAC9E,wDAAwD,yHAA4B;AACpF;AACA,QAAQ,MAAqC,IAAI,CAA+C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB,yHAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yHAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEAkwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils'; export class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id')); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.mapVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware086undefined8894undefined406430__WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__._undefined529556__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined860896 falseundefined9019470undefined15331560__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined16531690 trueundefined170317070undefined17301749"production"undefined21212148__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined22242261 trueundefined227422780undefined23012320"production"undefinedG8 checkIsOnDemandRevalidateCOOKIE_NAME_PRERENDER_BYPASSH ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js  2webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'; import { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies'; import { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'; import { DraftModeProvider } from './draft-mode-provider'; import { splitCookiesString } from '../web/utils'; function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } export function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } export function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } export function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.mapewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middlewarecKM_PRDQ{,9;HeSa+1WdfHsj~,NP`__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._ function getHeaders(headers) { const cleaned = __WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(headers); for (const header of __WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._){ cleaned.delete(header); } return __WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new __WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(headers)); return __WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of __WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__._(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new __WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new __WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = __WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = __WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__._(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new __WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.map x*AAA4E;AACJ;AACmH;AAC3G;AACtB;AACR;AAClD;AACA,oBAAoB,qFAAc;AAClC,yBAAyB,6FAAc;AACvC;AACA;AACA,WAAW,qFAAc;AACzB;AACA;AACA,wBAAwB,6FAAc,CAAC,qFAAc;AACrD,WAAW,iHAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yGAAkB;AAC/C;AACA;AACA,oCAAoC,+FAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,6FAAc,CAAC,qFAAc;AACxE;AACA;AACA;AACA,gCAAgC,mGAAqB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gDAAgD,4IAAmC;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,mGAAiB;AACvD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEAewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middlewareimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'; import { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies'; import { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'; import { DraftModeProvider } from './draft-mode-provider'; import { splitCookiesString } from '../web/utils'; function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } export function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } export function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } export function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middleware075undefined77148undefined150336undefined338417undefined419476undefined478527undefined580593__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined635648__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined701714__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined812825__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined827840__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined869896__WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined14781495__WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__._undefined16191633__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined18351841undefined22822288undefined39273940__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined39423955__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined42024222__WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined49084942__WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__._undefined52005216__WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._undefined55545560undefineda 9XHZ\=g  _VfUpMutableRequestCookiesAdaptersplitCookiesStringncreateCookiesWithMutableAccessCheckDraftModeProviderX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js  _webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const workUnitAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|sharedc?AGm@__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._ const workUnitAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=work-unit-async-storage-instance.js.map x AAAgE;AACzD,qCAAqC,oHAAuB;;AAEnEwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|sharedimport { createAsyncLocalStorage } from './async-local-storage'; export const workUnitAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|shared063undefined6571undefined109131__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`&@@J ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[8].use[0]!./node_modules/next/dist/esm/client/components/app-router-headers.js|shared {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1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w.U\r '.P[nG 2Lrapp_router_headers_RSC_HEADERapp_router_headers_ACTION_HEADERapp_router_headers_NEXT_ROUTER_STATE_TREE_HEADERapp_router_headers_NEXT_ROUTER_PREFETCH_HEADERapp_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERapp_router_headers_NEXT_HMR_REFRESH_HEADERcomponents_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEapp_router_headers_NEXT_URLapp_router_headers_RSC_CONTENT_TYPE_HEADERapp_router_headers_FLIGHT_HEADERSapp_router_headers_NEXT_RSC_UNION_QUERYapp_router_headers_NEXT_ROUTER_STALE_TIME_HEADERapp_router_headers_NEXT_DID_POSTPONE_HEADERapp_router_headers_NEXT_REWRITTEN_PATH_HEADERapp_router_headers_NEXT_REWRITTEN_QUERY_HEADERapp_router_headers_NEXT_IS_PRERENDER_HEADERapp_router_headers_NEXT_ACTION_NOT_FOUND_HEADER@ ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js  Mwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[8].use[0]!./node_modules/next/dist/esm/shared/lib/invariant-error.js|shared{"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}uclass InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map vyxAAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,IAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACFwebpack://../../../src/shared/lib/invariant-error.ts export class InvariantError extends Error { constructor(message: string, options?: ErrorOptions) { super( `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`, options ) this.name = 'InvariantError' } } InvariantErrorErrorconstructormessagename#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}`invariant_error_InvariantErrorX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js  nwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource// Share the instance module in the next-shared layer import { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; import { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'; import { InvariantError } from '../../shared/lib/invariant-error'; export { workUnitAsyncStorageInstance as workUnitAsyncStorage }; export function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } export function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } export function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } export function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } export function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } export function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } export function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map&webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shareda6ZXZ  ]p// Share the instance module in the next-shared layer function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map ^ahxAAAA;AAGE;AACwF;AACxB;AACF;AACzD;AACP,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA&webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared// Share the instance module in the next-shared layer import { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; import { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'; import { InvariantError } from '../../shared/lib/invariant-error'; export { workUnitAsyncStorageInstance as workUnitAsyncStorage }; export function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } export function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } export function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } export function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } export function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } export function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } export function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.mapiwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared54186undefined188277undefined279344undefined346409undefined411417undefined768774undefined10301036undefined17091715undefined27202726undefined35213527undefined41094115undefined47914797undefined54005406undefined58735879undefinedaC]AZowork_unit_async_storage_external_throwForMissingRequestStorework_unit_async_storage_external_getRuntimeStagePromise // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/invariant-error.js|middleware{"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}J LOVxb`lib_invariant_error_InvariantError: ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ export class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.mapWwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middlewareA=/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.map >AHxAAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAWwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ export class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.mapIhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware12541260undefinedY ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map(); export const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map vwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js|middleware{"version":3,"sources":["webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;AACrB,OAAO,MAAMA,eAAe,IAAIC,MAAqB;AAErD,OAAO,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0],"file":"x"}aflA,// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. const tagsManifest = new Map(); const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map -07xAAEA,+EAA+E;AAC/E,qBAAqB;AACd,MAAMA,eAAe,IAAIC,MAAqB;AAE9C,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAACwebpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.tsimport type { Timestamp } from '../cache-handlers/types' // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map() export const isStale = (tags: string[], timestamp: Timestamp) => { for (const tag of tags) { const revalidatedAt = tagsManifest.get(tag) if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true } } return false } tagsManifestMapisStaletagstimestamptagrevalidatedAtk// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map(); export const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;AACrB,OAAO,MAAMA,eAAe,IAAIC,MAAqB;AAErD,OAAO,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0],"file":"x"}#false102108undefined141147undefinedP ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js  i4webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceK/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache'; import { isStale, tagsManifest } from '../incremental-cache/tags-manifest.external'; // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; export default DefaultCacheHandler; //# sourceMappingURL=default.external.js.map mwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js|middleware{"version":3,"sources":["webpack://../../../../src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,SACtB,KAAK,OAAO,MACZ,CAACI,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KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,aAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,eAAeR,oBAAmB","ignoreList":[0],"file":"x"}` V< zcn @__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._Buffer__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && ()));=/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; /** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ // LRU cache default to max 50 MB but in future track const memoryCache = new __WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (__WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? __WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._.set(tag, timestamp); } } }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (DefaultCacheHandler))); //# sourceMappingURL=default.external.js.map x ;AAAA;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AAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,iFAAYA,CAAC6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,iEAAeR,gDAAAA,mBAAmBA,EAAAA,EAAAwebpack://../../../../src/server/lib/cache-handlers/default.external.ts*/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache' import type { CacheEntry, CacheHandlerV2 } from './types' import { isStale, tagsManifest, } from '../incremental-cache/tags-manifest.external' type PrivateCacheEntry = { entry: CacheEntry // For the default cache we store errored cache // entries and allow them to be used up to 3 times // after that we want to dispose it and try for fresh // If an entry is errored we return no entry // three times so that we retry hitting origin (MISS) // and then if it still fails to set after the third we // return the errored content and use expiration of // Math.min(30, entry.expiration) isErrored: boolean errorRetryCount: number // compute size on set since we need to read size // of the ReadableStream for LRU evicting size: number } // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache( 50 * 1024 * 1024, (entry) => entry.size ) const pendingSets = new Map>() const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined const DefaultCacheHandler: CacheHandlerV2 = { async get(cacheKey) { const pendingPromise = pendingSets.get(cacheKey) if (pendingPromise) { debug?.('get', cacheKey, 'pending') await pendingPromise } const privateEntry = memoryCache.get(cacheKey) if (!privateEntry) { debug?.('get', cacheKey, 'not found') return undefined } const entry = privateEntry.entry if ( performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000 ) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug?.('get', cacheKey, 'expired') return undefined } if (isStale(entry.tags, entry.timestamp)) { debug?.('get', cacheKey, 'had stale tag') return undefined } const [returnStream, newSaved] = entry.value.tee() entry.value = newSaved debug?.('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire, }) return { ...entry, value: returnStream, } }, async set(cacheKey, pendingEntry) { debug?.('set', cacheKey, 'start') let resolvePending: () => void = () => {} const pendingPromise = new Promise((resolve) => { resolvePending = resolve }) pendingSets.set(cacheKey, pendingPromise) const entry = await pendingEntry let size = 0 try { const [value, clonedValue] = entry.value.tee() entry.value = value const reader = clonedValue.getReader() for (let chunk; !(chunk = await reader.read()).done; ) { size += Buffer.from(chunk.value).byteLength } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size, }) debug?.('set', cacheKey, 'done') } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug?.('set', cacheKey, 'failed', err) } finally { resolvePending() pendingSets.delete(cacheKey) } }, async refreshTags() { // Nothing to do for an in-memory cache handler. }, async getExpiration(...tags) { const expiration = Math.max( ...tags.map((tag) => tagsManifest.get(tag) ?? 0) ) debug?.('getExpiration', { tags, expiration }) return expiration }, async expireTags(...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()) debug?.('expireTags', { tags, timestamp }) for (const tag of tags) { // TODO: update file-system-cache? tagsManifest.set(tag, timestamp) } }, } export default DefaultCacheHandler `:LRUCachememoryCacheentrypendingSetsdebugprocessenvNEXT_PRIVATE_DEBUG_CACHEconsolebindDefaultCacheHandlerMcacheKeypendingPromiseprivateEntryperformancetimeOriginnowيrevalidate׌returnStreamnewSavedvalueteeexpireBpendingEntryresolvePendingPromiseresolveclonedValuereadergetReaderchunkreaddoneBufferfrombyteLengthisErrorederrorRetryCounterrdeleterefreshTagsgetExpirationexpirationMathmaxexpireTagsroundConcatSourceRawSourceK/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; S/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache'; import { isStale, tagsManifest } from '../incremental-cache/tags-manifest.external'; // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; export default DefaultCacheHandler; //# sourceMappingURL=default.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,SACtB,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BE;AAEJ,MAAMC,sBAAsC;IAC1C,MAAMC,KAAIC,QAAQ;QAChB,MAAMC,iBAAiBZ,YAAYU,GAAG,CAACC;QAEvC,IAAIC,gBAAgB;YAClBV,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,MAAMC;QACR;QAEA,MAAMC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zB,MAAMwB,KAAK,GAAGA;YACd,MAAMS,SAASD,YAAYE,SAAS;YAEpC,IAAK,IAAIC,OAAO,CAAEA,CAAAA,QAAQ,MAAMF,OAAOG,IAAI,EAAA,CAAC,CAAGC,IAAI,EAAI;gBACrDpC,QAAQqC,OAAOC,IAAI,CAACJ,MAAMX,KAAK,EAAEgB,UAAU;YAC7C;YAEAzC,YAAY4B,GAAG,CAACd,UAAU;gBACxBb;gBACAyC,WAAW;gBACXC,iBAAiB;gBACjBzC;YACF;YAEAG,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;QAC3B,EAAE,OAAO8B,KAAK;YACZ,+DAA+D;YAC/DvC,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU,UAAU8B;QACrC,SAAU;YACRd;YACA3B,YAAY0C,MAAM,CAAC/B;QACrB;IACF;IAEA,MAAMgC;IACJ,gDAAgD;IAClD;IAEA,MAAMC,eAAc,GAAGzB,IAAI;QACzB,MAAM0B,aAAaC,KAAKC,GAAG,IACtB5B,KAAK6B,GAAG,CAAC,CAACC,MAAQrD,aAAac,GAAG,CAACuC,QAAQ;QAGhD/C,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,aAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,eAAeR,oBAAmB","ignoreList":[0],"file":"x"}false448487undefined489572undefined652659__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined17771783__WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._undefined29542959Bufferundefined37063717__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined41954206__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined42484262/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined42484262undefined42634262(/* unused pure expression or super */ null && (undefined42824281))undefined42824282.5);undefinedM[p \/ ] default_external_DefaultCacheHandlerdefault_external? ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport DefaultCacheHandler from '../lib/cache-handlers/default.external'; const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ export function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ export function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ export function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ export function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ export function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware`HI#% + X ^   const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map xXAAAyE;AACzE;AACA,8BAA8B,QAAQ;AACtC,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middlewareimport DefaultCacheHandler from '../lib/cache-handlers/default.external'; const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ export function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ export function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ export function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ export function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ export function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware072undefined797803undefined28532859undefined34163422undefined38063812undefined41174123undefinedb _x|!/3HLCCG\`handlers_debug? ;// ./node_modules/next/dist/esm/server/revalidation-utils.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourcee import { getCacheHandlers } from './use-cache/handlers'; /** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } export async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware`7E__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._u /** Run a callback, and execute any *new* revalidations added during its runtime. */ async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = __WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map xhAAAwD;AACxD,qFAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sGAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middlewaree import { getCacheHandlers } from './use-cache/handlers'; /** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } export async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware055undefined142148undefined20362051__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._undefined22242230undefinedAgetCacheHandlersD  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.maphwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middlewareElr#)E xFhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middlewareGBwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middleware876882undefined10591065undefined12391245undefinedb-_8_/Sz %u%0@[oA7async_local_storage_sharedAsyncLocalStorageNotAvailableErrorasync_local_storage_FakeAsyncLocalStorageasync_local_storage_maybeGlobalAsyncLocalStorageapp_render_async_local_storage_createAsyncLocalStorageasync_local_storage_bindSnapshotasync_local_storage_createSnapshotY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js  hwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const afterTaskAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.mapvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middlewarec?AGn@__WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._ const afterTaskAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=after-task-async-storage-instance.js.map x AAAgE;AACzD,sCAAsC,oHAAuB;;AAEpEvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middlewareimport { createAsyncLocalStorage } from './async-local-storage'; export const afterTaskAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middleware063undefined6571undefined110132__WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`'@Y ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js  fwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource7// Share the instance module in the next-shared layer import { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { afterTaskAsyncStorage }; //# sourceMappingURL=after-task-async-storage.external.js.mapvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware`6Bv// Share the instance module in the next-shared layer //# sourceMappingURL=after-task-async-storage.external.js.map xAAAA;AAGE;AAC+B;;AAEjCvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware7// Share the instance module in the next-shared layer import { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { afterTaskAsyncStorage }; //# sourceMappingURL=after-task-async-storage.external.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware54213undefined215247undefined@ ;// ./node_modules/next/dist/esm/server/after/after-context.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport PromiseQueue from 'next/dist/compiled/p-queue'; import { InvariantError } from '../../shared/lib/invariant-error'; import { isThenable } from '../../shared/lib/is-thenable'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { withExecuteRevalidates } from '../revalidation-utils'; import { bindSnapshot } from '../app-render/async-local-storage'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new PromiseQueue(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorage.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorage.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = bindSnapshot(async ()=>{ try { await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middlewaree57xz_AC35;=H~ ! W k )6%o@|__WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._s class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new __WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__._(); this.callbackQueue.pause(); } after(task) { if (__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = __WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = __WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = __WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__._(async ()=>{ try { await __WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = __WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._.getStore(); if (!workStore) { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return __WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map tw~xGAAAsD;AACY;AACR;AACmB;AACd;AACE;AACqB;AACE;AACjF;AACP,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA,iCAAiC,+EAAY;AAC7C;AACA;AACA;AACA,YAAY,0FAAU;AACtB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iGAAoB;AAClD;AACA;AACA;AACA,+BAA+B,mGAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,8FAAY;AAC5C;AACA,sBAAsB,mGAAqB;AAC3C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yFAAgB;AAC1C;AACA,4CAA4C,6FAAc;AAC1D;AACA;AACA;AACA,aAAa;AACb;AACA,eAAe,kHAAsB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,wDAAwD,6FAAc;AACtE;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middlewareimport PromiseQueue from 'next/dist/compiled/p-queue'; import { InvariantError } from '../../shared/lib/invariant-error'; import { isThenable } from '../../shared/lib/is-thenable'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { withExecuteRevalidates } from '../revalidation-utils'; import { bindSnapshot } from '../app-render/async-local-storage'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new PromiseQueue(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorage.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorage.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = bindSnapshot(async ()=>{ try { await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map9webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middleware053undefined55120undefined122179undefined181257undefined259321undefined323387undefined389474undefined476563undefined565571undefined829840__WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__._undefined917926__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined17631782__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined19181938__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined30943105__WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__._undefined31593179__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined37823797__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined38813894__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined41124133__WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._undefined49754988__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined S WB* m  ` hBY(p_queue_default())`workUnitAsyncStorageInstanceafterTaskAsyncStorageInstanceA!withExecuteRevalidates < ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ export function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } export function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middlewareC'-^/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.map _bixAAAA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEAYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ export function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } export function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.mapjwwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware181187undefined807813undefinedE ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { AfterContext } from '../after/after-context'; import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { createLazyResult } from '../lib/lazy-result'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createSnapshot } from '../app-render/async-local-storage'; export function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.mapbwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middlewarec 57R<>D$ %:__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._M function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: __WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__._(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: __WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__._(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new __WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__._({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = __WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, __WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map NQXx AAAsD;AACqB;AACrB;AACS;AACI;AAC5D,2BAA2B,yEAAyE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kGAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD,eAAe,yFAAY;AAC3B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kHAAsB;AAChD;AACA;AACA;AACA,iDAAiD,sGAAgB;AACjE;AACA;AACA;AACA;AACA;;AAEAbwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middlewareimport { AfterContext } from '../after/after-context'; import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { createLazyResult } from '../lib/lazy-result'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createSnapshot } from '../app-render/async-local-storage'; export function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middleware053undefined55129undefined131184undefined186248undefined250316undefined318324undefined18131828__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__._undefined29532966__WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__._undefined32733284__WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__._undefined36213642__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined38293844__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefinedI: 3 MmAfterContextgetCacheHandlerEntriescreateLazyResult= ;// ./node_modules/next/dist/esm/server/web/web-on-close.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ export function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } export function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } export class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.mapZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middlewareEhn9/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.map :=DxRAAAA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yDAAyD,UAAU,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ export function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } export function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } export class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.mapEwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware136142undefined616622undefined11741180undefinedG ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js  [webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceF/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ export function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.mapdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middlewareA(?/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map ),3xAAAAA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEAdwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middlewareF/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ export function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map4swebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middleware235241undefinedJ ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js  swebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceRimport { createAsyncLocalStorage } from '../app-render/async-local-storage'; export function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ export function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.mapgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middlewarebKMSAIO function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map "xaAAA4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEAgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middlewareRimport { createAsyncLocalStorage } from '../app-render/async-local-storage'; export function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ export function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware075undefined7783undefined585591undefined> ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js  ) webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middlewarea@BLSY__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._@ const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = __WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, __WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map  xAAAiE;AACF;AACd;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,sCAAsC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kHAAsB;AAChD;AACA;AACA;AACA,iDAAiD,sGAAgB;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,oHAA0B,CAAC,EAAE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,oHAA0B,CAAC,EAAE,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware064undefined66128undefined130178undefined12761297__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined14861501__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined16191625undefined19401965__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined22262251__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefinedGKy y NEXT_CACHE_IMPLICIT_TAG_ID? ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js  #webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ export function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middlewareA/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map x0AAAA;AACA;AACA,kCAAkC;AAClC,IAAW;AACX;AACA;;AAEA\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ export function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.mapkwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware163169undefined8 ;// ./node_modules/next/dist/esm/server/web/adapter.js  5Wwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource Fimport { PageSignatureError } from './error'; import { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'; import { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event'; import { NextRequest } from './spec-extension/request'; import { NextResponse } from './spec-extension/response'; import { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url'; import { NextURL } from './next-url'; import { stripInternalSearchParams } from '../internal-utils'; import { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'; import { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers'; import { ensureInstrumentationRegistered } from './globals'; import { createRequestStoreForAPI } from '../async-storage/request-store'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { createWorkStore } from '../async-storage/work-store'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'; import { getTracer } from '../lib/trace/tracer'; import { MiddlewareSpan } from '../lib/trace/constants'; import { CloseController } from './web-on-close'; import { getEdgePreviewProps } from './get-edge-preview-props'; import { getBuiltinRequestContext } from '../after/builtin-request-context'; import { getImplicitTags } from '../lib/implicit-tags'; import { isRSCRequestHeader } from '../lib/is-rsc-request'; export class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm require('next/dist/experimental/testmode/server-edge'); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } export async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: process.env.NODE_ENV !== 'development', fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX, dev: process.env.NODE_ENV === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\/\//))) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middlewareeJ,.|~_KM\^AC"$pr46_fh+-gioHYIZH Y S Y _$>3u4.dp}!_!!!!!h$z$,%:%%%&'&**p++++1172e2h4w4555577:8NT8<+<Y<l<L>R>??)B6BBBxEE__WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__.___webpack_require__720__WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._ false0__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._"production"""__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__.___WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._ true__WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._0__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._true__WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._J class NextRequestHint extends __WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__._ { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new __WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = __WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm __webpack_require__(720); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await __WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__._(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = __WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__._(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = __WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__._(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = __WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = __WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__._(requestHeaders.get(__WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__._)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of __WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = false ? 0 : requestURL; const rscHash = normalizeURL.searchParams.get(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: __WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: "production" !== 'development', fetchCacheKeyPrefix: "", dev: "production" === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: __WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = __WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__._()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new __WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__._({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new __WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__._(); return __WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._().trace(__WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__._.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = __WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await __WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__._(page, request.nextUrl, fallbackRouteParams); const requestStore = __WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__._(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = __WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__._({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__._) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await __WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._.run(workStore, ()=>__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if ( true && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = __WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !( false && 0)) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__._, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._)) { rewriteURL.searchParams.set(__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new __WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (true) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', __WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__._(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : __WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: __WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map x AAA6C;AACkC;AACa;AACrC;AACE;AACuC;AAC3D;AACyB;AACY;AAC6F;AAC3G;AACc;AACY;AACxB;AACe;AACY;AACzC;AACQ;AACP;AACc;AACa;AACrB;AACI;AACpD,8BAA8B,uFAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,oGAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wFAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D,YAAY,mBAAO,CAAC,GAA6C;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,UAAU,mIAA+B;AACzC;AACA;AACA,yBAAyB,oGAAe;AACxC,gFAAgF,+EAAO;AACvF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mHAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2HAA2B;AACtD;AACA,yBAAyB,0GAAkB,oBAAoB,qFAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6FAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAA8C,GAAG,CAA2B;AACrG,kDAAkD,yGAAoB;AACtE;AACA;AACA;AACA,eAAe,wHAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAoB;AAC7C,iCAAiC,EAAyC;AAC1E,iBAAiB,YAAoB;AACrC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,qCAAqC;AACrC;AACA,6BAA6B,4GAAmB;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qFAAqF,sHAAwB;AAC7G,sBAAsB,4FAAc;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+FAAe;AACvD,mBAAmB,wFAAS,SAAS,gFAAc;AACnD,wCAAwC,gBAAgB,EAAE,yBAAyB;AACnF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,yCAAyC,4GAAmB;AAC5D;AACA;AACA;AACA,+CAA+C,oGAAe;AAC9D,yCAAyC,sHAAwB;AACjE,sCAAsC,oGAAe;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,yBAAyB;AACzB,+DAA+D,uHAA2B;AAC1F;AACA;AACA,qBAAqB;AACrB,iCAAiC,yFAAgB,oBAAoB,iGAAoB;AACzF,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+EAAO;AACvC;AACA;AACA;AACA,SAAS;AACT,YAAY,KAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC,EAAE,sGAAgB;AACzE;AACA;AACA;AACA,UAAU,MAAsD,IAAI,CAA0C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qHAA0B;AAC/D;AACA;AACA,qCAAqC,uHAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,yGAAoB;AAC7D,wCAAwC,yGAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+EAAO;AACvC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,YAAY,IAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,kGAAc;AACpE;AACA;AACA,gDAAgD,iFAAY;AAC5D;AACA;AACA;AACA;AACA;AACA,8DAA8D,IAAI;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6HAA4B;AAC/C;AACA;AACA;;AAEAUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware Fimport { PageSignatureError } from './error'; import { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'; import { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event'; import { NextRequest } from './spec-extension/request'; import { NextResponse } from './spec-extension/response'; import { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url'; import { NextURL } from './next-url'; import { stripInternalSearchParams } from '../internal-utils'; import { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'; import { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers'; import { ensureInstrumentationRegistered } from './globals'; import { createRequestStoreForAPI } from '../async-storage/request-store'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { createWorkStore } from '../async-storage/work-store'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'; import { getTracer } from '../lib/trace/tracer'; import { MiddlewareSpan } from '../lib/trace/constants'; import { CloseController } from './web-on-close'; import { getEdgePreviewProps } from './get-edge-preview-props'; import { getBuiltinRequestContext } from '../after/builtin-request-context'; import { getImplicitTags } from '../lib/implicit-tags'; import { isRSCRequestHeader } from '../lib/is-rsc-request'; export class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm require('next/dist/experimental/testmode/server-edge'); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } export async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: process.env.NODE_ENV !== 'development', fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX, dev: process.env.NODE_ENV === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\/\//))) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware044undefined46124undefined126217undefined219273undefined275331undefined333428undefined430466undefined468529undefined531604undefined606772undefined774833undefined835908undefined910995undefined9971058undefined10601136undefined11381226undefined12281275undefined12771332undefined13341382undefined13841446undefined14481523undefined15251579undefined15811639undefined16411647undefined16781688__WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__._undefined18641881__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined21212138__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined23762393__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined27592767__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined32473253__webpack_require__undefined32553299720undefined34113417undefined35293559__WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__._undefined37153729__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__._undefined38323838__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined43344356__WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__._undefined49004926__WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined50455062__WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__._undefined50835092__WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__._undefined53515364__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined56085653 falseundefined565756830undefined57495768__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined59165940__WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._undefined69396958"production"undefined70127052""undefined70727091"production"undefined74027420__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined76857708__WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__._undefined77927805__WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__._undefined86048618__WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__._undefined86428650__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined86608673__WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__._undefined93209338__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined95169530__WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__._undefined96189641__WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__._undefined97539767__WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__._undefined1092310949__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__._undefined1112011135__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined1115611175__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined1268612692__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1285512901 trueundefined1341613431__WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._undefined1370613759 falseundefined13764138050undefined1423214257__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__._undefined1439414420__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._undefined1538415403__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1544915468__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1594815954__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1631716363trueundefined1693716950__WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__._undefined1706517076__WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined1778417811__WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._undefineda&5_;B^ ]   t WZ]hR[_$ !k!u!!K$$h%%#&&'k'+e,-h-}--346!79]::\; ?J??@ALBEYFFGI\JNextRequest444ensureInstrumentationRegisteredOnormalizeNextQueryParamfromNodeOutgoingHttpHeadersisRSCRequestHeaderstripInternalSearchParamsgetEdgePreviewPropsgetBuiltinRequestContextNextFetchEventCloseControllerMiddlewareSpangetImplicitTagscreateRequestStoreForAPIcreateWorkStorebNextResponsegetWaitUntilPromiseFromEvent // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js  7webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import parseua from 'next/dist/compiled/ua-parser-js'; export function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } export function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } export function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.mapgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middlewareb57=Crx function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.map xUAAAsD;AAC/C;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO,qBAAqB,SAAS;AACrC;AACA;;AAEAgwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware import parseua from 'next/dist/compiled/ua-parser-js'; export function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } export function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } export function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware053undefined5561undefined474480undefined626632undefinedK ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; export { GlobalURLPattern as URLPattern }; //# sourceMappingURL=url-pattern.js.maphwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middlewareAconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; //# sourceMappingURL=url-pattern.js.map xAAAA;AACA;AAC0C;;AAE1Chwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middlewareconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; export { GlobalURLPattern as URLPattern }; //# sourceMappingURL=url-pattern.js.mapwwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middleware145186undefined8 ;// ./node_modules/next/dist/esm/server/after/after.js  4webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource)import { workAsyncStorage } from '../app-render/work-async-storage.external'; /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ export function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware`LA /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map xlAAA6E;AAC7E;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY,eAAe;AAC3B;AACA;;AAEAUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware)import { workAsyncStorage } from '../app-render/work-async-storage.external'; /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ export function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.mappwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware076undefined187193undefined8 ;// ./node_modules/next/dist/esm/server/after/index.js  ;webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource;export * from './after'; //# sourceMappingURL=index.js.mapUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware`# //# sourceMappingURL=index.js.map x AAAwB;;AAExBUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware;export * from './after'; //# sourceMappingURL=index.js.map;export * from './after'; //# sourceMappingURL=index.js.mapawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware023undefined // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; export class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } export function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/hooks-server-context.js|middleware{"version":3,"sources":["webpack://../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}a39A|const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map }xFAAAA,MAAMA,qBAAqB;AAEpB,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,aAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxBwebpack://../../../src/client/components/hooks-server-context.tsconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE' export class DynamicServerError extends Error { digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE constructor(public readonly description: string) { super(`Dynamic server usage: ${description}`) } } export function isDynamicServerError(err: unknown): err is DynamicServerError { if ( typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string' ) { return false } return err.digest === DYNAMIC_ERROR_CODE } DYNAMIC_ERROR_CODEDynamicServerErrordescriptiondigestisDynamicServerErrorconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; export class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } export function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map {"version":3,"sources":["webpack://../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}!false5157undefined258264undefineda9Jhooks_server_context_DynamicServerErrorQ ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; export class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } export function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map nwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/static-generation-bailout.js|middleware{"version":3,"sources":["webpack://../../../src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":"AAAA,MAAMA,0BAA0B;AAEhC,OAAO,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEA,OAAO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0],"file":"x"}a;AAcconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map dgnxAAAA,MAAMA,0BAA0B;AAEzB,MAAMC,8BAA8BC;;QAApC,qBACWC,IAAAA,GAAOH;;AACzB;AAEO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,WAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxBwebpack://../../../src/client/components/static-generation-bailout.tsconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT' export class StaticGenBailoutError extends Error { public readonly code = NEXT_STATIC_GEN_BAILOUT } export function isStaticGenBailoutError( error: unknown ): error is StaticGenBailoutError { if (typeof error !== 'object' || error === null || !('code' in error)) { return false } return error.code === NEXT_STATIC_GEN_BAILOUT } NEXT_STATIC_GEN_BAILOUTStaticGenBailoutErrorcodeisStaticGenBailoutErrorerrorconst NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; export class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } export function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map {"version":3,"sources":["webpack://../../../src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":"AAAA,MAAMA,0BAA0B;AAEhC,OAAO,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEA,OAAO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0],"file":"x"}!false5965undefined205211undefinedaAUstatic_generation_bailout_StaticGenBailoutErrorD ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource export function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ export function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} export function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.mapawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middlewareCNT J function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map KNUxAAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,YAAY,sGAAsG,YAAY,+KAA+K,MAAM;AACzV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEAawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware export function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ export function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} export function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.mapVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware06undefined11021108undefined25102516undefinedAPadynamic_rendering_utils_makeHangingPromiseF ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js  hwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceAexport const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; export const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; export const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; export const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.mapcwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middlewareaDJC8%const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map 9<CxAAAO;AACA;AACA;AACA;;AAEPcwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middlewareAexport const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; export const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; export const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; export const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.mapDwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middleware06undefined6874undefined136142undefined200206undefinedL ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js|middleware{"version":3,"sources":["webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}C 6<'// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map (+2xOAAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GAC/E,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GACrG,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,aAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxBwebpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING' /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { public readonly digest = BAILOUT_TO_CSR constructor(public readonly reason: string) { super(`Bail out to client-side rendering: ${reason}`) } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err: unknown): err is BailoutToCSRError { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false } return err.digest === BAILOUT_TO_CSR } BAILOUT_TO_CSRBailoutToCSRErrorreasonisBailoutToCSRError7// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}#false260266undefined566572undefinedA bailout_to_csr_BailoutToCSRErrorI ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js  N1webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcexx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react'; import { DynamicServerError } from '../../client/components/hooks-server-context'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { getRuntimeStagePromise, workUnitAsyncStorage } from './work-unit-async-storage.external'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants'; import { scheduleOnNextTick } from '../../lib/scheduler'; import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'; import { InvariantError } from '../../shared/lib/invariant-error'; const hasPostpone = typeof React.unstable_postpone === 'function'; export function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } export function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } export function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } export function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; export function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } export function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } export function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } export function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } export function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } export function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } export function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } export function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); export function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = "production" !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } export var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); export function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } export function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } export function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map fwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js|middleware{"version":3,"sources":["webpack://../../../src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AACxF,OAAOA,WAAW,QAAO;AAEzB,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,sBAAsB,EACtBC,oBAAoB,QACf,qCAAoC;AAC3C,SAASC,gBAAgB,QAAQ,4CAA2C;AAC5E,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,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AAK,CAAC,wGAAwG,CAAC;YAErI,MAAM,IAAIlC;QACZ;IACF,OAAO;QACL,IACEsH,kBAAkBhG,iBAAiB,KAAK,SACxCgG,kBAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEA,OAAO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"file":"x"}`2_)BDSU|~ K h l P V > D Z ` {_ ' #"#&&((//00,1+1Q1P1S1Y1x2~2559:_::=;C;<<BBE EMMNN\'\l\\\\]%]3]9]e ff'f=gCgEhKhCHkNk|ww__WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._false{}(/* unused pure expression or super */ null && ())__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._ false0mu/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly const hasPostpone = typeof __WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._.unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if (false) {} break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if (false) {} break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport const trackSynchronousRequestDataAccessInDev = (/* unused pure expression or super */ null && (trackSynchronousPlatformIOAccessInDev)); function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__._}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${__WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = false ? 0 : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map x)AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AAC/D;AAEwD;AACQ;AAI9C;AACiC;AACb;AAMhB;AACS;AACwB;AACf;AAEjE,MAAMc,cAAc,OAAOd,kEAAKA,CAACe,iBAAiB,KAAK;AAwChD,SAASC,2BACdC,sBAA2C;IAE3C,OAAO;QACLA;QACAC,iBAAiB,EAAE;QACnBC,2BAA2B;IAC7B;AACF;AAEO,SAASC;IACd,OAAO;QACLC,sBAAsB;QACtBC,oBAAoB;QACpBC,oBAAoB;QACpBC,mBAAmB;QACnBC,eAAe,EAAE;IACnB;AACF;AAEO,SAASC,sBACdC,aAAmC;QAE5BA;IAAP,QAAOA,kCAAAA,cAAcT,eAAe,CAAC,OAAE,gBAAhCS,gCAAkCC,UAAU;AACrD;AAEA;;;;;;CAMC,GACM,SAASC,0BACdC,KAAgB,EAChBC,aAAuE,EACvEH,UAAkB;IAElB,IAAIG,eAAe;QACjB,OAAQA,cAAcC,IAAI;YACxB,KAAK;YACL,KAAK;gBACH,iEAAiE;gBACjE,kEAAkE;gBAClE,gEAAgE;gBAChE,kCAAkC;gBAClC;YACF,KAAK;gBACH,0DAA0D;gBAC1D;YACF,KAAK;YACL,KAAK;YACL,KAAK;gBACH;YACF;gBACED;QACJ;IACF;IAEA,2EAA2E;IAC3E,4EAA4E;IAC5E,2DAA2D;IAC3D,IAAID,MAAMG,YAAY,IAAIH,MAAMI,WAAW,EAAE;IAE7C,IAAIJ,MAAMK,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BAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACTwebpack://../../../src/server/app-render/dynamic-rendering.tsx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ import type { WorkStore } from '../app-render/work-async-storage.external' import type { WorkUnitStore, RequestStore, PrerenderStoreLegacy, PrerenderStoreModern, PrerenderStoreModernRuntime, } from '../app-render/work-unit-async-storage.external' // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react' import { DynamicServerError } from '../../client/components/hooks-server-context' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { getRuntimeStagePromise, workUnitAsyncStorage, } from './work-unit-async-storage.external' import { workAsyncStorage } from '../app-render/work-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME, } from '../../lib/framework/boundary-constants' import { scheduleOnNextTick } from '../../lib/scheduler' import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr' import { InvariantError } from '../../shared/lib/invariant-error' const hasPostpone = typeof React.unstable_postpone === 'function' export type DynamicAccess = { /** * If debugging, this will contain the stack trace of where the dynamic access * occurred. This is used to provide more information to the user about why * their page is being rendered dynamically. */ stack?: string /** * The expression that was accessed dynamically. */ expression: string } // Stores dynamic reasons used during an RSC render. export type DynamicTrackingState = { /** * When true, stack information will also be tracked during dynamic access. */ readonly isDebugDynamicAccesses: boolean | undefined /** * The dynamic accesses that occurred during the render. */ readonly dynamicAccesses: Array syncDynamicErrorWithStack: null | Error } // Stores dynamic reasons used during an SSR render. export type DynamicValidationState = { hasSuspenseAboveBody: boolean hasDynamicMetadata: boolean hasDynamicViewport: boolean hasAllowedDynamic: boolean dynamicErrors: Array } export function createDynamicTrackingState( isDebugDynamicAccesses: boolean | undefined ): DynamicTrackingState { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null, } } export function createDynamicValidationState(): DynamicValidationState { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [], } } export function getFirstDynamicReason( trackingState: DynamicTrackingState ): undefined | string { return trackingState.dynamicAccesses[0]?.expression } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic( store: WorkStore, workUnitStore: undefined | Exclude, expression: string ): void { if (workUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender-legacy': case 'prerender-ppr': case 'request': break default: workUnitStore satisfies never } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return if (store.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'prerender-ppr': return postponeWithTracking( store.route, expression, workUnitStore.dynamicTracking ) case 'prerender-legacy': workUnitStore.revalidate = 0 // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration( expression: string, store: WorkStore, prerenderStore: PrerenderStoreLegacy ): never { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) prerenderStore.revalidate = 0 store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } function abortOnSynchronousDynamicDataAccess( route: string, expression: string, prerenderStore: PrerenderStoreModern ): void { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` const error = createPrerenderInterruptedError(reason) prerenderStore.controller.abort(error) const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function abortOnSynchronousPlatformIOAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): void { const dynamicTracking = prerenderStore.dynamicTracking abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } export function trackSynchronousPlatformIOAccessInDev( requestStore: RequestStore ): void { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): never { const prerenderSignal = prerenderStore.controller.signal if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } throw createPrerenderInterruptedError( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` ) } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack) } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev /** * This component will call `React.postpone` that throws the postponed error. */ type PostponeProps = { reason: string route: string } export function Postpone({ reason, route }: PostponeProps): never { const prerenderStore = workUnitAsyncStorage.getStore() const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null postponeWithTracking(route, reason, dynamicTracking) } export function postponeWithTracking( route: string, expression: string, dynamicTracking: null | DynamicTrackingState ): never { assertPostpone() if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } React.unstable_postpone(createPostponeReason(route, expression)) } function createPostponeReason(route: string, expression: string) { return ( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error` ) } export function isDynamicPostpone(err: unknown) { if ( typeof err === 'object' && err !== null && typeof (err as any).message === 'string' ) { return isDynamicPostponeReason((err as any).message) } return false } function isDynamicPostponeReason(reason: string) { return ( reason.includes( 'needs to bail out of prerendering at this point because it used' ) && reason.includes( 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error' ) ) } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw new Error( 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js' ) } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED' function createPrerenderInterruptedError(message: string): Error { const error = new Error(message) ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED return error } type DigestError = Error & { digest: string } export function isPrerenderInterruptedError( error: unknown ): error is DigestError { return ( typeof error === 'object' && error !== null && (error as any).digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error ) } export function accessedDynamicData( dynamicAccesses: Array ): boolean { return dynamicAccesses.length > 0 } export function consumeDynamicAccess( serverDynamic: DynamicTrackingState, clientDynamic: DynamicTrackingState ): DynamicTrackingState['dynamicAccesses'] { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses) return serverDynamic.dynamicAccesses } export function formatDynamicAPIAccesses( dynamicAccesses: Array ): string[] { return dynamicAccesses .filter( (access): access is Required => typeof access.stack === 'string' && access.stack.length > 0 ) .map(({ expression, stack }) => { stack = stack .split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4) .filter((line) => { // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false } return true }) .join('\n') return `Dynamic API Usage Debug - ${expression}:\n${stack}` }) } function assertPostpone() { if (!hasPostpone) { throw new Error( `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js` ) } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal(): AbortSignal { const controller = new AbortController() controller.abort(new BailoutToCSRError('Render in Browser')) return controller.signal } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal( workUnitStore: WorkUnitStore ): AbortSignal | undefined { switch (workUnitStore.type) { case 'prerender': case 'prerender-runtime': const controller = new AbortController() if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(() => { controller.abort() }) } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore) if (runtimeStagePromise) { runtimeStagePromise.then(() => scheduleOnNextTick(() => controller.abort()) ) } else { scheduleOnNextTick(() => controller.abort()) } } return controller.signal case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined default: workUnitStore satisfies never } } export function annotateDynamicAccess( expression: string, prerenderStore: PrerenderStoreModern ) { const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function useDynamicRouteParams(expression: string) { const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore && workUnitStore) { switch (workUnitStore.type) { case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use( makeHangingPromise( workUnitStore.renderSignal, workStore.route, expression ) ) } break } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking( workStore.route, expression, workUnitStore.dynamicTracking ) } break } case 'prerender-runtime': throw new InvariantError( `\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'cache': case 'private-cache': throw new InvariantError( `\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'prerender-legacy': case 'request': case 'unstable-cache': break default: workUnitStore satisfies never } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/ // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6' // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp( `\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)` ) const hasMetadataRegex = new RegExp( `\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]` ) const hasViewportRegex = new RegExp( `\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]` ) const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`) export function trackAllowedDynamicAccess( workStore: WorkStore, componentStack: string, dynamicValidation: DynamicValidationState, clientDynamic: DynamicTrackingState ) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true return } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true return } else if ( hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test( componentStack ) ) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true dynamicValidation.hasSuspenseAboveBody = true return } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true return } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push( clientDynamic.syncDynamicErrorWithStack ) return } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense` const error = createErrorWithComponentOrOwnerStack(message, componentStack) dynamicValidation.dynamicErrors.push(error) return } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack( message: string, componentStack: string ) { const ownerStack = process.env.NODE_ENV !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null const error = new Error(message) error.stack = error.name + ': ' + message + (ownerStack ?? componentStack) return error } export enum PreludeState { Full = 0, Empty = 1, Errored = 2, } export function logDisallowedDynamicError( workStore: WorkStore, error: Error ): void { console.error(error) if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error( `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.` ) } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`) } } } export function throwIfDisallowedDynamic( workStore: WorkStore, prelude: PreludeState, dynamicValidation: DynamicValidationState, serverDynamic: DynamicTrackingState ): void { if (prelude !== PreludeState.Full) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError( workStore, serverDynamic.syncDynamicErrorWithStack ) throw new StaticGenBailoutError() } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors if (dynamicErrors.length > 0) { for (let i = 0; i < dynamicErrors.length; i++) { logDisallowedDynamicError(workStore, dynamicErrors[i]) } throw new StaticGenBailoutError() } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error( `Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport` ) throw new StaticGenBailoutError() } if (prelude === PreludeState.Empty) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error( `Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.` ) throw new StaticGenBailoutError() } } else { if ( dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata ) { console.error( `Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata` ) throw new StaticGenBailoutError() } } } export function delayUntilRuntimeStage( prerenderStore: PrerenderStoreModernRuntime, result: Promise ): Promise { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(() => result) } return result } @ReactgetRuntimeStagePromiseworkUnitAsyncStorageworkAsyncStoragemakeHangingPromiseMETADATA_BOUNDARY_NAMEVIEWPORT_BOUNDARY_NAMEOUTLET_BOUNDARY_NAMEROOT_LAYOUT_BOUNDARY_NAMEscheduleOnNextTickhasPostponeunstable_postponecreateDynamicTrackingStateisDebugDynamicAccessesdynamicAccessessyncDynamicErrorWithStackcreateDynamicValidationStatehasSuspenseAboveBodyhasDynamicMetadatahasDynamicViewporthasAllowedDynamicdynamicErrorsgetFirstDynamicReasontrackingStateexpressionmarkCurrentScopeAsDynamicstoreworkUnitStoretypeforceDynamicforceStaticdynamicShouldErrorvpostponeWithTrackingdynamicTrackingdynamicUsageDescriptiondynamicUsageStackstackNODE_ENVusedDynamicthrowToInterruptStaticGenerationprerenderStoretrackDynamicDataInDynamicRenderabortOnSynchronousDynamicDataAccesscreatePrerenderInterruptedErrorcontrollerabortpushlabortOnSynchronousPlatformIOAccesserrorWithStacktrackSynchronousPlatformIOAccessInDevrequestStoreprerenderPhaseabortAndThrowOnSynchronousRequestDataAccessprerenderSignalsignalabortedwarnOnSyncDynamicErrortrackSynchronousRequestDataAccessInDevPostponegetStoreassertPostponecreatePostponeReasonisDynamicPostpone^isDynamicPostponeReason+NEXT_PRERENDER_INTERRUPTEDUisPrerenderInterruptedErroraccessedDynamicDataconsumeDynamicAccessserverDynamicclientDynamicformatDynamicAPIAccessesfilteraccess3lline?createRenderInBrowserAbortSignalAbortControllercreateHangingInputAbortSignalcacheSignalinputReadyruntimeStagePromiseannotateDynamicAccessuseDynamicRouteParamsworkStorefallbackParamsfallbackRouteParamsuserenderSignalhasSuspenseRegexbodyAndImplicitTagshasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegexRegExphasMetadataRegexhasViewportRegexhasOutletRegextrackAllowedDynamicAccesscomponentStackdynamicValidationtestcreateErrorWithComponentOrOwnerStackownerStackcaptureOwnerStack9PreludeStatelogDisallowedDynamicErrordevhasReadableErrorStacksthrowIfDisallowedDynamicpreludeidelayUntilRuntimeStagexx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react'; import { DynamicServerError } from '../../client/components/hooks-server-context'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { getRuntimeStagePromise, workUnitAsyncStorage } from './work-unit-async-storage.external'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants'; import { scheduleOnNextTick } from '../../lib/scheduler'; import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'; import { InvariantError } from '../../shared/lib/invariant-error'; const hasPostpone = typeof React.unstable_postpone === 'function'; export function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } export function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } export function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } export function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; export function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } export function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } export function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } export function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } export function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } export function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } export function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } export function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); export function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = "production" !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } export var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); export function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } export function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } export function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map {"version":3,"sources":["webpack://../../../src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AACxF,OAAOA,WAAW,QAAO;AAEz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G,kBAAkB,EAAE;YACxC+C,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8QAA8Q,CAAC;YAE3S,MAAM,IAAIlC;QACZ;QAEA,IAAIiI,YAAAA,GAAgC;YAClC,6EAA6E;YAC7E,iFAAiF;YACjF,2CAA2C;YAC3C7D,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,wGAAwG,CAAC;YAErI,MAAM,IAAIlC;QACZ;IACF,OAAO;QACL,IACEsH,kBAAkBhG,iBAAiB,KAAK,SACxCgG,kBAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEA,OAAO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"file":"x"}false15771602undefined16041685undefined16871776undefined17781875undefined18771953undefined19552018undefined20202172undefined21742230undefined22322312undefined23142379undefined24082412__WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._undefined24482454undefined26402646undefined28782884undefined34183424undefined60116039falseundefined60426114{}undefined64066412undefined73497355undefined81368164falseundefined81678231{}undefined89888994undefined97459751undefined1038310389undefined1216512171undefined1253412540undefined1258812587(/* unused pure expression or super */ null && (undefined1262512624))undefined1262712633undefined1292012926undefined1374213748undefined1484414850undefined1506915075undefined1516515171undefined1551815524undefined1712317129undefined1769017696undefined1983919845undefined2017520181undefined2356723591__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2366023681__WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2374423765__WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2382623845__WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2385923865undefined2606826123 falseundefined26127261510undefined2642926435undefined2669326699undefined2746427470undefined3058830594undefined` UN$_}....IO\OXXX7YvYYZZreact_react_serverdynamic_rendering_postponeWithTrackingdynamic_rendering_throwToInterruptStaticGenerationdynamic_rendering_trackDynamicDataInDynamicRender: ;// ./node_modules/next/dist/esm/server/request/utils.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceLimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } export function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map Wwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/request/utils.js|middlewareb {"version":3,"sources":["webpack://../../../src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;AAGvF,OAAO,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEA,OAAO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,AAAkB,MAAK;AAChD","ignoreList":[0],"file":"x"}aY[Hrx[aX^~ function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map xAAAyF;AACF;AAGhF,SAASE,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,qBAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,qBAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,qBAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,MAAuB;AAChDwebpack://../../../src/server/request/utils.ts,import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external' import type { WorkStore } from '../app-render/work-async-storage.external' export function throwWithStaticGenerationBailoutError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwWithStaticGenerationBailoutErrorWithDynamicError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwForSearchParamsAccessInUseCache( workStore: WorkStore, constructorOpt: Function ): never { const error = new Error( `Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, constructorOpt) workStore.invalidDynamicUsageError ??= error throw error } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore() return afterTaskStore?.rootTaskSpawnPhase === 'action' } `*afterTaskAsyncStoragethrowWithStaticGenerationBailoutErrorthrowWithStaticGenerationBailoutErrorWithDynamicErrorthrowForSearchParamsAccessInUseCacheˎconstructorOpt(captureStackTraceinvalidDynamicUsageErrorisRequestAPICallableInsideAfterafterTaskStorerootTaskSpawnPhaseLimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } export function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map b {"version":3,"sources":["webpack://../../../src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;AAGvF,OAAO,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEA,OAAO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,AAAkB,MAAK;AAChD","ignoreList":[0],"file":"x"}_false089undefined91178undefined180186undefined626632undefined11151121undefined18801886undefinedAutils_isRequestAPICallableInsideAfter? ;// ./node_modules/next/dist/esm/server/request/connection.js  ?webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceMimport { workAsyncStorage } from '../app-render/work-async-storage.external'; import { throwForMissingRequestStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender } from '../app-render/dynamic-rendering'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { makeHangingPromise, makeDevtoolsIOAwarePromise } from '../dynamic-rendering-utils'; import { isRequestAPICallableInsideAfter } from './utils'; /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if ("production" === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map \webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/request/connection.js|middleware^!{"version":3,"sources":["webpack://../../../src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynamicTracking","process","env","NODE_ENV"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,4CAA2C;AAC5E,SACEC,2BAA2B,EAC3BC,oBAAoB,QACf,i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,CAFa,IAAIR,MAChB,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,iXAAiX,CAAC,GAD/X,qBAAA;mCAAA;wCAAA;0CAAA;wBAEd;wBACAD,MAAMS,iBAAiB,CAACD,OAAOd;wBAC/BE,UAAUc,wBAAwB,KAAKF;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBACH,MAAM,OAAA,cAEL,CAFK,IAAIR,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,0XAA0X,CAAC,GADhZ,qBAAA;+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,OAAOV,mBACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,OAAOd,qBACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,OAAOxB,iCACL,cACAQ,WACAE;gBAEJ,KAAK;oBACHT,gCAAgCS;oBAChC,IAAIe,AA1Fc,QA0FNC,GAAG,CAACC,KAAa,GAAL,YAAoB;wBAC1C,wEAAwE;wBACxE,8EAA8E;wBAC9E,4EAA4E;wBAC5E,OAAOvB,2BAA2Ba;oBACpC,OAAO;wBACL,OAAOF,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9B","ignoreList":[0],"file":"x"} aLNNKM> Ebefalse{}nk /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if (false) {} else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map oryx?AAA4E;AAIrB;AAKf;AACiD;AAItD;AACsB;AAEzD;;;;CAIC,GACM,SAASU;IACd,MAAMC,oBAAoB;IAC1B,MAAMC,YAAYZ,iBAAiBa,QAAQ;IAC3C,MAAMC,gBAAgBZ,qBAAqBW,QAAQ;IAEnD,IAAID,WAAW;QACb,IACEE,iBACAA,cAAcC,KAAK,KAAK,WACxB,CAACN,mCACD;YACA,MAAM,qBAEL,CAFK,IAAIO,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,6UAA6U,CAAC,GADnW;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,IAAIL,UAAUM,WAAW,EAAE;YACzB,sEAAsE;YACtE,+CAA+C;YAC/C,OAAOC,QAAQC,OAAO,CAACC;QACzB;QAEA,IAAIT,UAAUU,kBAAkB,EAAE;YAChC,MAAM,qBAEL,CAFK,IAAIhB,sBACR,CAAC,MAAM,EAAEM,UAAUK,KAAK,CAAC,oNAAoN,CAAC,GAD1O;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,IAAIH,eAAe;YACjB,OAAQA,cAAcS,IAAI;gBACxB,KAAK;oBAAS;wBACZ,MAAMC,QAAQ,qBAEb,CAFa,IAAIR,MAChB,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,kVAAkV,CAAC,GADhW;mCAAA;wCAAA;0CAAA;wBAEd;wBACAD,MAAMS,iBAAiB,CAACD,OAAOd;wBAC/BE,UAAUc,wBAAwB,KAAKF;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBAAiB;wBACpB,qEAAqE;wBACrE,oEAAoE;wBACpE,4DAA4D;wBAC5D,MAAMA,QAAQ,qBAEb,CAFa,IAAIR,MAChB,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,iXAAiX,CAAC,GAD/X;mCAAA;wCAAA;0CAAA;wBAEd;wBACAD,MAAMS,iBAAiB,CAACD,OAAOd;wBAC/BE,UAAUc,wBAAwB,KAAKF;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBACH,MAAM,qBAEL,CAFK,IAAIR,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,0XAA0X,CAAC,GADhZ;+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,OAAOV,mBACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,OAAOd,qBACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,OAAOxB,iCACL,cACAQ,WACAE;gBAEJ,KAAK;oBACHT,gCAAgCS;oBAChC,IAAIe,KAAoB,EAAoB,EAK3C,MAAM;wBACL,OAAOV,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9Bwebpack://../../../src/server/request/connection.ts]import { workAsyncStorage } from '../app-render/work-async-storage.external' import { throwForMissingRequestStore, workUnitAsyncStorage, } from '../app-render/work-unit-async-storage.external' import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender, } from '../app-render/dynamic-rendering' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { makeHangingPromise, makeDevtoolsIOAwarePromise, } from '../dynamic-rendering-utils' import { isRequestAPICallableInsideAfter } from './utils' /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection(): Promise { const callingExpression = 'connection' const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore) { if ( workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter() ) { throw new Error( `Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after` ) } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined) } if (workStore.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'cache': { const error = new Error( `Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = new Error( `Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'unstable-cache': throw new Error( `Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache` ) case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise( workUnitStore.renderSignal, workStore.route, '`connection()`' ) case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking( workStore.route, 'connection', workUnitStore.dynamicTracking ) case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration( 'connection', workStore, workUnitStore ) case 'request': trackDynamicDataInDynamicRender(workUnitStore) if (process.env.NODE_ENV === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined) } else { return Promise.resolve(undefined) } default: workUnitStore satisfies never } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression) } ` bthrowForMissingRequestStore`~ bmakeDevtoolsIOAwarePromiseconnectioncallingExpressionvphasexpqyv {\]Mimport { workAsyncStorage } from '../app-render/work-async-storage.external'; import { throwForMissingRequestStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender } from '../app-render/dynamic-rendering'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { makeHangingPromise, makeDevtoolsIOAwarePromise } from '../dynamic-rendering-utils'; import { isRequestAPICallableInsideAfter } from './utils'; /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if ("production" === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ^!{"version":3,"sources":["webpack://../../../src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynamicTracking","process","env","NODE_ENV"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,4CAA2C;AAC5E,SACEC,2BAA2B,EAC3BC,oBAAoB,QACf,iDAAgD;AACvD,SACEC,oBAAoB,EACpBC,gCAAgC,EAChCC,+BAA+B,QAC1B,kCAAiC;AACxC,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,kBAAkB,EAClBC,0BAA0B,QACrB,6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wBAC/BE,UAAUc,wBAAwB,KAAKF;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBACH,MAAM,OAAA,cAEL,CAFK,IAAIR,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,0XAA0X,CAAC,GADhZ,qBAAA;+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,OAAOV,mBACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,OAAOd,qBACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,OAAOxB,iCACL,cACAQ,WACAE;gBAEJ,KAAK;oBACHT,gCAAgCS;oBAChC,IAAIe,AA1Fc,QA0FNC,GAAG,CAACC,KAAa,GAAL,YAAoB;wBAC1C,wEAAwE;wBACxE,8EAA8E;wBAC9E,4EAA4E;wBAC5E,OAAOvB,2BAA2Ba;oBACpC,OAAO;wBACL,OAAOF,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9B","ignoreList":[0],"file":"x"}false076undefined78192undefined194331undefined333422undefined424515undefined517574undefined777783undefined62136242falseundefined62456638{}undefinedD ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js  Jwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; export function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } export function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map awebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js|middlewareR {"version":3,"sources":["webpack://../../../../src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAErC,OAAO,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEA,OAAO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEA,OAAO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0],"file":"x"}EV// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map WZaxFAAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAE9B,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAACwebpack://../../../../src/shared/lib/utils/reflect-utils.tsh// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/ export function describeStringPropertyAccess(target: string, prop: string) { if (isDefinitelyAValidIdentifier.test(prop)) { return `\`${target}.${prop}\`` } return `\`${target}[${JSON.stringify(prop)}]\`` } export function describeHasCheckingStringProperty( target: string, prop: string ) { const stringifiedProp = JSON.stringify(prop) return `\`Reflect.has(${target}, ${stringifiedProp})\`, \`${stringifiedProp} in ${target}\`, or similar` } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule', ]) ` isDefinitelyAValidIdentifierdescribeStringPropertyAccesstargetpropdescribeHasCheckingStringPropertystringifiedPropwellKnownPropertiesSet// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; export function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } export function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map R {"version":3,"sources":["webpack://../../../../src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAErC,OAAO,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEA,OAAO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEA,OAAO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0],"file":"x"}2false466472undefined695701undefined939945undefinedCreflect_utils_describeStringPropertyAccessreflect_utils_wellKnownPropertiesU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js  Wwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport { createAsyncLocalStorage } from './async-local-storage'; export const actionAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.mapwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|sharedc?AGk@__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._9 const actionAsyncStorageInstance = __WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._(); //# sourceMappingURL=action-async-storage-instance.js.map :=Dx AAAgE;AACzD,mCAAmC,oHAAuB;;AAEjEwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|sharedimport { createAsyncLocalStorage } from './async-local-storage'; export const actionAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.mapE webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared063undefined6571undefined107129__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefined`$@U ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js   webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource.// Share the instance module in the next-shared layer import { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { actionAsyncStorageInstance as actionAsyncStorage }; //# sourceMappingURL=action-async-storage.external.js.map#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared`6B(r// Share the instance module in the next-shared layer //# sourceMappingURL=action-async-storage.external.js.map ),3xAAAA;AAGE;AAC0D;;AAE5D#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared.// Share the instance module in the next-shared layer import { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { actionAsyncStorageInstance as actionAsyncStorage }; //# sourceMappingURL=action-async-storage.external.js.map4@webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared54181undefined183242undefined4 ;// ./node_modules/next/dist/esm/lib/picocolors.js  pwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource, // 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'); 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.mapQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware`_CBEKIO1 7 g m   WI O  6 < p v  # V \ (/* unused pure expression or super */ null && ()) // 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'); 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; }; }; const reset = (/* unused pure expression or super */ null && (enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String)); const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m'); const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m'); const italic = formatter('\x1b[3m', '\x1b[23m'); const underline = formatter('\x1b[4m', '\x1b[24m'); const inverse = formatter('\x1b[7m', '\x1b[27m'); const hidden = formatter('\x1b[8m', '\x1b[28m'); const strikethrough = formatter('\x1b[9m', '\x1b[29m'); const black = formatter('\x1b[30m', '\x1b[39m'); const red = formatter('\x1b[31m', '\x1b[39m'); const green = formatter('\x1b[32m', '\x1b[39m'); const yellow = formatter('\x1b[33m', '\x1b[39m'); const blue = formatter('\x1b[34m', '\x1b[39m'); const magenta = formatter('\x1b[35m', '\x1b[39m'); const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m'); const cyan = formatter('\x1b[36m', '\x1b[39m'); const white = formatter('\x1b[37m', '\x1b[39m'); const gray = formatter('\x1b[90m', '\x1b[39m'); const bgBlack = formatter('\x1b[40m', '\x1b[49m'); const bgRed = formatter('\x1b[41m', '\x1b[49m'); const bgGreen = formatter('\x1b[42m', '\x1b[49m'); const bgYellow = formatter('\x1b[43m', '\x1b[49m'); const bgBlue = formatter('\x1b[44m', '\x1b[49m'); const bgMagenta = formatter('\x1b[45m', '\x1b[49m'); const bgCyan = formatter('\x1b[46m', '\x1b[49m'); const bgWhite = formatter('\x1b[47m', '\x1b[49m'); //# sourceMappingURL=picocolors.js.map "x]AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,cAAc,yEAAyB,EAAE,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,EAAE,IAAI,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEPQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware, // 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'); 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#_webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware17941800undefined18151814(/* unused pure expression or super */ null && (undefined18591858))undefined18611867undefined19341940undefined20062012undefined20622068undefined21212127undefined21782184undefined22342240undefined22972303undefined23532359undefined24072413undefined24632469undefined25202526undefined25752581undefined26332639undefined27042710undefined27592765undefined28152821undefined28702876undefined29282934undefined29842990undefined30423048undefined31013107undefined31583164undefined32183224undefined32753281undefinedC picocolors_resetpicocolors_hidden6 ;// ./node_modules/next/dist/esm/build/output/log.js  *webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'; import { LRUCache } from '../../server/lib/lru-cache'; export const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } export function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } export function wait(...message) { prefixedLog('wait', ...message); } export function error(...message) { prefixedLog('error', ...message); } export function warn(...message) { prefixedLog('warn', ...message); } export function ready(...message) { prefixedLog('ready', ...message); } export function info(...message) { prefixedLog('info', ...message); } export function event(...message) { prefixedLog('event', ...message); } export function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); export function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.mapSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middlewarecOQ_-136JPRUN%kqKQ%+__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._ const prefixes = { wait: __WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('○')), error: __WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('⨯')), warn: __WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('⚠')), ready: '▲', info: __WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._(' ')), event: __WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('✓')), trace: __WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } function wait(...message) { prefixedLog('wait', ...message); } function error(...message) { prefixedLog('error', ...message); } function warn(...message) { prefixedLog('warn', ...message); } function ready(...message) { prefixedLog('ready', ...message); } function info(...message) { prefixedLog('info', ...message); } function event(...message) { prefixedLog('event', ...message); } function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new __WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._(10000, (value)=>value.length); function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map xAAAgF;AAC1B;AAC/C;AACP,UAAU,gFAAK,CAAC,8EAAI;AACpB,WAAW,4EAAG,CAAC,8EAAI;AACnB,UAAU,kFAAM,CAAC,8EAAI;AACrB;AACA,UAAU,gFAAK,CAAC,8EAAI;AACpB,WAAW,gFAAK,CAAC,8EAAI;AACrB,WAAW,oFAAO,CAAC,8EAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA,0BAA0B,iFAAQ;AAC3B;AACP;AACA;AACA;AACA;AACA;AACA;;AAEASwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'; import { LRUCache } from '../../server/lib/lru-cache'; export const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } export function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } export function wait(...message) { prefixedLog('wait', ...message); } export function error(...message) { prefixedLog('error', ...message); } export function warn(...message) { prefixedLog('warn', ...message); } export function ready(...message) { prefixedLog('ready', ...message); } export function info(...message) { prefixedLog('info', ...message); } export function event(...message) { prefixedLog('event', ...message); } export function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); export function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware079undefined81134undefined136142undefined172176__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined178181__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined201203__WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__._undefined205208__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined227232__WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__._undefined234237__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined272276__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined278281__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined301305__WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__._undefined307310__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined330336__WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__._undefined338341__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined12661272undefined14931499undefined15671573undefined16431649undefined17171723undefined17931799undefined18671873undefined19431949undefined20452052__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined20852091undefinedcnp\k~ABDG a e  1 8 whiteboldredyellowgreenmagentalog_eventlog_tracelog_warnOnce@ ;// ./node_modules/next/dist/esm/server/request/root-params.js  xwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcey5import { InvariantError } from '../../shared/lib/invariant-error'; import { postponeWithTracking, throwToInterruptStaticGeneration } from '../app-render/dynamic-rendering'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils'; import { actionAsyncStorage } from '../app-render/action-async-storage.external'; import { warnOnce } from '../../build/output/log'; const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map ]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/request/root-params.js|middlewareH{"version":3,"sources":["webpack://../../../src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SACEC,oBAAoB,EACpBC,gCAAgC,QAC3B,kCAAiC;AACxC,SACEC,gBAAgB,QAEX,4CAA2C;AAClD,SACEC,oBAAoB,QAIf,iDAAgD;AACvD,SAASC,kBAAkB,QAAQ,6BAA4B;AAG/D,SACEC,4BAA4B,EAC5BC,mBAAmB,QACd,uCAAsC;AAC7C,SAASC,kBAAkB,QA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UI,KAAK,EACf8B;gBAEJ;gBACA;YACF;QACA,KAAK;YAAiB;gBACpB,mEAAmE;gBACnE,0FAA0F;gBAC1F,IACEvB,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOO,6BACLP,WACAjC,WACAW,gBACAuB;gBAEJ;gBACA;YACF;QACA,KAAK;YAAoB;gBAEvB;YACF;QACA;YAAS;gBACPvB;YACF;IACF;IAEA,uFAAuF;IACvF,OAAOH,QAAQC,OAAO,CAACC,gBAAgB,CAACuB,UAAU;AACpD;AAEA,yFAAyF,GACzF,eAAeO,6BACbP,SAAiB,EACjBjC,SAAoB,EACpBW,cAAwD,EACxDuB,OAAe;IAEf,MAAML,aAAapC,6BAA6ByC,SAASD;IACzD,8DAA8D;IAC9D,gFAAgF;IAChF,yFAAyF;IACzF,qGAAqG;IACrG,OAAQtB,eAAeN,IAAI;QACzB,KAAK;YAAiB;gBACpB,OAAOjB,qBACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACF","ignoreList":[0],"file":"x"} aACPPRMO2 const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map x AAAiE;AAIzB;AAIU;AAMK;AACQ;AAMlB;AACmC;AAC/B;AAGjD,MAAMU,eAAe,IAAIC;AAEzB;;CAEC,GACM,eAAeC;IACpBH,SACE;IAEF,MAAMI,YAAYV,iBAAiBW,QAAQ;IAC3C,IAAI,CAACD,WAAW;QACd,MAAM,qBAA8D,CAA9D,IAAIb,eAAe,6CAAnB;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMe,gBAAgBX,qBAAqBU,QAAQ;IAEnD,IAAI,CAACC,eAAe;QAClB,MAAM,qBAEL,CAFK,IAAIC,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,8FAA8F,CAAC,GADpH;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,OAAQF,cAAcG,IAAI;QACxB,KAAK;QACL,KAAK;YAAkB;gBACrB,MAAM,qBAEL,CAFK,IAAIF,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,kKAAkK,CAAC,GADxL;2BAAA;gCAAA;kCAAA;gBAEN;YACF;QACA,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAOE,0BACLJ,cAAcK,UAAU,EACxBP,WACAE;QAEJ,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAOM,QAAQC,OAAO,CAACP,cAAcK,UAAU;QACjD;YACE,OAAOL;IACX;AACF;AAEA,SAASI,0BACPI,gBAAwB,EACxBV,SAAoB,EACpBW,cAAoC;IAEpC,OAAQA,eAA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eN,IAAI;QACzB,KAAK;YAAa;gBAChB,mCAAmC;gBACnC,+DAA+D;gBAC/D,IACEM,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOzC,mBACLmB,eAAeS,YAAY,EAC3BpB,UAAUI,KAAK,EACf8B;gBAEJ;gBACA;YACF;QACA,KAAK;YAAiB;gBACpB,mEAAmE;gBACnE,0FAA0F;gBAC1F,IACEvB,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOO,6BACLP,WACAjC,WACAW,gBACAuB;gBAEJ;gBACA;YACF;QACA,KAAK;YAAoB;gBAEvB;YACF;QACA;YAAS;gBACPvB;YACF;IACF;IAEA,uFAAuF;IACvF,OAAOH,QAAQC,OAAO,CAACC,gBAAgB,CAACuB,UAAU;AACpD;AAEA,yFAAyF,GACzF,eAAeO,6BACbP,SAAiB,EACjBjC,SAAoB,EACpBW,cAAwD,EACxDuB,OAAe;IAEf,MAAML,aAAapC,6BAA6ByC,SAASD;IACzD,8DAA8D;IAC9D,gFAAgF;IAChF,yFAAyF;IACzF,qGAAqG;IACrG,OAAQtB,eAAeN,IAAI;QACzB,KAAK;YAAiB;gBACpB,OAAOjB,qBACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACFwebpack://../../../src/server/request/root-params.ts.import { InvariantError } from '../../shared/lib/invariant-error' import { postponeWithTracking, throwToInterruptStaticGeneration, } from '../app-render/dynamic-rendering' import { workAsyncStorage, type WorkStore, } from '../app-render/work-async-storage.external' import { workUnitAsyncStorage, type PrerenderStoreLegacy, type PrerenderStorePPR, type StaticPrerenderStore, } from '../app-render/work-unit-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import type { FallbackRouteParams } from './fallback-params' import type { Params, ParamValue } from './params' import { describeStringPropertyAccess, wellKnownProperties, } from '../../shared/lib/utils/reflect-utils' import { actionAsyncStorage } from '../app-render/action-async-storage.external' import { warnOnce } from '../../build/output/log' interface CacheLifetime {} const CachedParams = new WeakMap>() /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams(): Promise { warnOnce( '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.' ) const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError('Missing workStore in unstable_rootParams') } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.` ) } switch (workUnitStore.type) { case 'cache': case 'unstable-cache': { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams( workUnitStore.rootParams, workStore, workUnitStore ) case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams) default: return workUnitStore satisfies never } } function createPrerenderRootParams( underlyingParams: Params, workStore: WorkStore, prerenderStore: StaticPrerenderStore ): Promise { switch (prerenderStore.type) { case 'prerender-client': { const exportName = '`unstable_rootParams`' throw new InvariantError( `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.` ) } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const promise = makeHangingPromise( prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`' ) CachedParams.set(underlyingParams, promise) return promise } } } break } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams( underlyingParams, fallbackParams, workStore, prerenderStore ) } } } break } case 'prerender-legacy': break default: prerenderStore satisfies never } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams) } function makeErroringRootParams( underlyingParams: Params, fallbackParams: FallbackRouteParams, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy ): Promise { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const augmentedUnderlying = { ...underlyingParams } // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying) CachedParams.set(underlyingParams, promise) Object.keys(underlyingParams).forEach((prop) => { if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get() { const expression = describeStringPropertyAccess( 'unstable_rootParams', prop ) // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } else { // Legacy Prerender throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } }, enumerable: true, }) } else { ;(promise as any)[prop] = underlyingParams[prop] } } }) return promise } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName: string): Promise { const apiName = `\`import('next/root-params').${paramName}()\`` const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError(`Missing workStore in ${apiName}`) } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.` ) } const actionStore = actionAsyncStorage.getStore() if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw new Error( `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.` ) } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw new Error( `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.` ) } } switch (workUnitStore.type) { case 'unstable-cache': case 'cache': { throw new Error( `Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise( paramName, workStore, workUnitStore, apiName ) } case 'private-cache': case 'prerender-runtime': case 'request': { break } default: { workUnitStore satisfies never } } return Promise.resolve(workUnitStore.rootParams[paramName]) } function createPrerenderRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: StaticPrerenderStore, apiName: string ): Promise { switch (prerenderStore.type) { case 'prerender-client': { throw new InvariantError( `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.` ) } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams switch (prerenderStore.type) { case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeHangingPromise( prerenderStore.renderSignal, workStore.route, apiName ) } break } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeErroringRootParamPromise( paramName, workStore, prerenderStore, apiName ) } break } case 'prerender-legacy': { // legacy prerenders can't have fallback params break } default: { prerenderStore satisfies never } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]) } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy, apiName: string ): Promise { const expression = describeStringPropertyAccess(apiName, paramName) // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch (prerenderStore.type) { case 'prerender-ppr': { return postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } case 'prerender-legacy': { return throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } default: { prerenderStore satisfies never } } } `6uactionAsyncStoragewarnOnceCachedParams*unstable_rootParams)rmcreatePrerenderRootParamsrootParamsunderlyingParamsexportName&'keyhascachedParams%&&makeErroringRootParamsaugmentedUnderlyingObjectkeysforEachdefinePropertyenumerablegetRootParamparamNameapiNameactionStoreisAppRouteisActionhcreatePrerenderRootParamPromisemakeErroringRootParamPromiseBy5import { InvariantError } from '../../shared/lib/invariant-error'; import { postponeWithTracking, throwToInterruptStaticGeneration } from '../app-render/dynamic-rendering'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils'; import { actionAsyncStorage } from '../app-render/action-async-storage.external'; import { warnOnce } from '../../build/output/log'; const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map H{"version":3,"sources":["webpack://../../../src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SACEC,oBAAoB,EACpBC,gCAAgC,QAC3B,kCAAiC;AACxC,SACEC,gBAAgB,QAEX,4CAA2C;AAClD,SACEC,oBAAoB,QAIf,iDAAgD;AACvD,SAASC,kBAAkB,QAAQ,6BAA4B;AAG/D,SACEC,4BAA4B,EAC5BC,mBAAmB,QACd,uCAAsC;AAC7C,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,QAAQ,QAAQ,yBAAwB;AAGjD,MAAMC,eAAe,IAAIC;AAEzB;;CAEC,GACD,OAAO,eAAeC;IACpBH,SACE;IAEF,MAAMI,YAAYV,iBAAiBW,QAAQ;IAC3C,IAAI,CAACD,WAAW;QACd,MAAM,OAAA,cAA8D,CAA9D,IAAIb,eAAe,6CAAnB,qBAAA;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMe,gBAAgBX,qBAAqBU,QAAQ;IAEnD,IAAI,CAACC,eAAe;QAClB,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,8FAA8F,CAAC,GADpH,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,OAAQF,cAAcG,IAAI;QACxB,KAAK;QACL,KAAK;YAAkB;gBACrB,MAAM,OAAA,cAEL,CAFK,IAAIF,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,kKAAkK,CAAC,GADxL,q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emB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACF","ignoreList":[0],"file":"x"}false065undefined67171undefined173249undefined251336undefined338401undefined403507undefined509589undefined591640undefined762768undefined73687374undefined> ;// ./node_modules/next/dist/esm/server/web/exports/index.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceM// Alias index file of next/server for edge runtime for tree-shaking purpose export { ImageResponse } from '../spec-extension/image-response'; export { NextRequest } from '../spec-extension/request'; export { NextResponse } from '../spec-extension/response'; export { userAgent, userAgentFromString } from '../spec-extension/user-agent'; export { URLPattern } from '../spec-extension/url-pattern'; export { after } from '../../after'; export { connection } from '../../request/connection'; export { unstable_rootParams } from '../../request/root-params'; //# sourceMappingURL=index.js.map[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware`MNPR)w// Alias index file of next/server for edge runtime for tree-shaking purpose //# sourceMappingURL=index.js.map x8AAAA;AACiE;AACT;AACE;AACoB;AACnB;AACvB;AACkB;AACU;;AAEhE[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middlewareM// Alias index file of next/server for edge runtime for tree-shaking purpose export { ImageResponse } from '../spec-extension/image-response'; export { NextRequest } from '../spec-extension/request'; export { NextResponse } from '../spec-extension/response'; export { userAgent, userAgentFromString } from '../spec-extension/user-agent'; export { URLPattern } from '../spec-extension/url-pattern'; export { after } from '../../after'; export { connection } from '../../request/connection'; export { unstable_rootParams } from '../../request/root-params'; //# sourceMappingURL=index.js.mapwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware77141undefined143198undefined200257undefined259336undefined338396undefined398433undefined435488undefined490553undefined0 ;// ./node_modules/next/dist/esm/api/server.js  Hwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourcePexport * from '../server/web/exports/index'; //# sourceMappingURL=server.js.mapMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware`+$ //# sourceMappingURL=server.js.map x AAA4C;;AAE5CMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middlewarePexport * from '../server/web/exports/index'; //# sourceMappingURL=server.js.mapYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware043undefined ;// ./src/middleware.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; 6webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./src/middleware.js|middleware{"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings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BAAEC,OAAO;YAAwC,IAAI;gBAC1FC,QAAQ;gBACRrC,SAAS;oBACP,gBAAgB;oBAChB,qBAAqBsC,OAAO3C;oBAC5B,yBAAyB;oBACzB,qBAAqB2C,OAAOL,OAAOb,KAAK;oBACxC,iBAAiB;gBACnB;YACF;QACF;QACA,MAAMmB,WAAW9C,aAAaiC,IAAI;QAClCa,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAO3C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,aAAaiC,IAAI;AAC1B;AAEA,OAAO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAE","file":"x"}`*Khs__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__.___WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._ const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return __WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._.next(); } const config = { matcher: "/api/:path*" }; xAAA2C;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAAKK,GAAG,CAACI,KAAKQ,MAAM,CAACC,CAAAA,IAAKN,MAAMM,IAAIP;IACvDK,WAAWG,IAAI,CAACP;IAChBZ,KAAKe,GAAG,CAACN,KAAKO;IACd,OAAO;QACLI,SAASJ,WAAWK,MAAM,IAAIX;QAC9BY,WAAWC,KAAKb,GAAG,CAAC,GAAGA,MAAMM,WAAWK,MAAM;QAC9CG,OAAOD,KAAKE,IAAI,CAACb,MAAM,QAAQW,KAAKE,IAAI,CAACd,WAAW;IACtD;AACF;AAEO,SAASe,WAAWvB,OAAO;IAChC,MAAM,EAAEwB,QAAQ,EAAE,GAAGxB,QAAQyB,OAAO;IACpC,IAAI,CAACD,SAASE,UAAU,CAAC,UAAU,OAAOhC,iFAAYA,CAACiC,IAAI;IAE3D,MAAMC,KAAK7B,YAAYC;IACvB,MAAM6B,WAAWC,QAAQC,GAAG,CAACC,SAAS,IAAIF,QAAQC,GAAG,CAACE,oBAAoB,KAAK;IAE/E,IAAI,CAACJ,UAAU;QACb,MAAMK,SAAS7B,oBAAoB,CAAC,GAAG,EAAEuB,IAAI;QAC7C,IAAI,CAACM,OAAOjB,OAAO,EAAE;YACnB,OAAO,IAAIvB,yFAAYA,CAACyC,KAAKC,SAAS,CAAC;gBAAEC,OAAO;YAAwC,IAAI;gBAC1FC,QAAQ;gBACRrC,SAAS;oBACP,gBAAgB;oBAChB,qBAAqBsC,OAAO3C;oBAC5B,yBAAyB;oBACzB,qBAAqB2C,OAAOL,OAAOb,KAAK;oBACxC,iBAAiB;gBACnB;YACF;QACF;QACA,MAAMmB,WAAW9C,iFAAYA,CAACiC,IAAI;QAClCa,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAO3C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,iFAAYA,CAACiC,IAAI;AAC1B;AAEO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAEwebpack://./src/middleware.jsLimport { NextResponse } from "next/server"; const WINDOW_MS = 60_000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter(t => now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; `1WINDOW_MSMAX_PER_WINDOWhitsmgetClientIprequesttrimcheckRateLimitLocalwindowMsDatetimestampstallowedremainingresetceilmiddleware.nextUrlGnextipuseRedis{|REDIS_URLCOSMIC_REDIS_ENABLED'statusStringresponseconfigmatcherimport { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; {"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings":"AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAAKK,GAAG,CAACI,KAAKQ,MAAM,CAACC,CAAAA,IAAKN,MAAMM,IAAIP;IACv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746752undefined872883__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined11531164__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._undefined16711682__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19631974__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19861992undefinedG67Pa ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js  )webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSource1export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } export function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } export function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map ~webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js|middleware {"version":3,"sources":["webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"file":"x"}G `fnconst HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map oryxkAAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAErC,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACM,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,aAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACFwebpack://../../../../src/client/components/http-access-fallback/http-access-fallback.tsexport const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401, } const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)) export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK' export type HTTPAccessFallbackError = Error & { digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}` } /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError( error: unknown ): error is HTTPAccessFallbackError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const [prefix, httpStatus] = error.digest.split(';') return ( prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)) ) } export function getAccessFallbackHTTPStatus( error: HTTPAccessFallbackError ): number { const httpStatus = error.digest.split(';')[1] return Number(httpStatus) } export function getAccessFallbackErrorTypeByStatus( status: number ): 'not-found' | 'forbidden' | 'unauthorized' | undefined { switch (status) { case 401: return 'unauthorized' case 403: return 'forbidden' case 404: return 'not-found' default: return } } `HTTPAccessErrorStatusNOT_FOUNDFORBIDDENUNAUTHORIZEDALLOWED_CODESvaluesHTTP_ERROR_FALLBACK_ERROR_CODEisHTTPAccessFallbackError!httpStatusNumbergetAccessFallbackHTTPStatusgetAccessFallbackErrorTypeByStatus1export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } export function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } export function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map  {"version":3,"sources":["webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"file":"x"}Nfalse06undefined173179undefined515521undefined864870undefined10011007undefinedAhttp_access_fallback_isHTTPAccessFallbackErrorL ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js  2webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceexport var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/redirect-status-code.js|middlewareh{"version":3,"sources":["webpack://../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0],"file":"x"}Nvar RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map ORYx8AAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIXwebpack://../../../src/client/components/redirect-status-code.tskexport enum RedirectStatusCode { SeeOther = 303, TemporaryRedirect = 307, PermanentRedirect = 308, } RedirectStatusCodeexport var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map h{"version":3,"sources":["webpack://../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0],"file":"x"}`redirect_status_code_RedirectStatusCodeF ;// ./node_modules/next/dist/esm/client/components/redirect-error.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourcecimport { RedirectStatusCode } from './redirect-status-code'; export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; export var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map cwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/redirect-error.js|middlewarei{"version":3,"sources":["webpack://../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAA,CAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0],"file":"x"}d;=CqwA: const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map ;>ExAAA2D;AAEpD,MAAMC,sBAAsB,gBAAe;AAE3C,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACM,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,aAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,OAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElBwebpack://../../../src/client/components/redirect-error.tsimport { RedirectStatusCode } from './redirect-status-code' export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT' export enum RedirectType { push = 'push', replace = 'replace', } export type RedirectError = Error & { digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};` } /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error: unknown): error is RedirectError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const digest = error.digest.split(';') const [errorCode, type] = digest const destination = digest.slice(2, -2).join(';') const status = digest.at(-2) const statusCode = Number(status) return ( errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode ) } `REDIRECT_ERROR_CODERedirectTypeisRedirectErrorerrorCodeCdestinationatstatusCode΅isNaNcimport { RedirectStatusCode } from './redirect-status-code'; export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; export var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map i{"version":3,"sources":["webpack://../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAA,CAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0],"file":"x"}<false059undefined6167undefined113119undefined502508undefinedAredirect_error_isRedirectErrorL ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/SourceMapSourceimport { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback'; import { isRedirectError } from './redirect-error'; /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map iwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/client/components/is-next-router-error.js|middleware{"version":3,"sources":["webpack://../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0],"file":"x"}aWYB<BO /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map ")xWAAGoD;AACkB;AAEtE;;;;CAIC,GACM,SAASE,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7Dwebpack://../../../src/client/components/is-next-router-error.ts"import { isHTTPAccessFallbackError, type HTTPAccessFallbackError, } from './http-access-fallback/http-access-fallback' import { isRedirectError, type RedirectError } from './redirect-error' /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError( error: unknown ): error is RedirectError | HTTPAccessFallbackError { return isRedirectError(error) || isHTTPAccessFallbackError(error) } isNextRouterErrorimport { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback'; import { isRedirectError } from './redirect-error'; /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map {"version":3,"sources":["webpack://../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0],"file":"x"}.false087undefined89139undefined316322undefined ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceimport "next/dist/server/web/globals"; import { adapter } from "next/dist/server/web/adapter"; // Import the userland code. import * as _mod from "private-next-root-dir/src/middleware.js"; import { edgeInstrumentationOnRequestError } from "next/dist/server/web/globals"; import { isNextRouterError } from "next/dist/client/components/is-next-router-error"; const mod = { ..._mod }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (process.env.NODE_ENV !== 'production') { if (isNextRouterError(err)) { err.message = `Next.js navigation API is not allowed to be used in Middleware.`; throw err; } } const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } export default function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middlewaree %']|P cz}Vv 06__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._false{}__WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._ S // Import the userland code. const mod = { ...__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._ }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (false) {} const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await __WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__._(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } function nHandler(opts) { return __WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map  xsAAAsC;AACiB;AACvD;AACgE;AACiB;AACI;AACrF;AACA,OAAO,8CAAI;AACX;AACA;AACA;AACA;AACA,6DAA6D,KAAK;AAClE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,gBAAgB,KAAqC,EAAE,EAK1C;AACb;AACA;AACA;AACA,kBAAkB,uIAAiC;AACnD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACe;AACf,WAAW,oFAAO;AAClB;AACA;AACA;AACA,KAAK;AACL;;AAEAwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middlewareimport "next/dist/server/web/globals"; import { adapter } from "next/dist/server/web/adapter"; // Import the userland code. import * as _mod from "private-next-root-dir/src/middleware.js"; import { edgeInstrumentationOnRequestError } from "next/dist/server/web/globals"; import { isNextRouterError } from "next/dist/client/components/is-next-router-error"; const mod = { ..._mod }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (process.env.NODE_ENV !== 'production') { if (isNextRouterError(err)) { err.message = `Next.js navigation API is not allowed to be used in Middleware.`; throw err; } } const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } export default function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware037undefined3993undefined124187undefined189269undefined271355undefined378381__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._undefined12221258falseundefined12611471{}undefined16221654__WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__._undefined20442058undefined20962102__WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._undefineda7dCL}middleware_namespaceObjectedgeInstrumentationOnRequestErroradapterbuffersourcesizemapshash// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (false) {} // The condition is true when the "process" module is provided if (process !== __webpack_require__.g.process) { // prefer local process but global.process has correct "env" process.env = __webpack_require__.g.process.env; __webpack_require__.g.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.map ;// ./node_modules/next/dist/esm/server/web/error.js class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map ;// ./node_modules/next/dist/esm/lib/constants.js const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; const MATCHED_PATH_HEADER = 'x-matched-path'; const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; const RSC_SEGMENT_SUFFIX = '.segment.rsc'; const RSC_SUFFIX = '.rsc'; const ACTION_SUFFIX = '.action'; const NEXT_DATA_SUFFIX = '.json'; const NEXT_META_SUFFIX = '.meta'; const NEXT_BODY_SUFFIX = '.body'; const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well const NEXT_CACHE_TAG_MAX_ITEMS = 128; const NEXT_CACHE_TAG_MAX_LENGTH = 256; const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files const MIDDLEWARE_FILENAME = 'middleware'; const MIDDLEWARE_LOCATION_REGEXP = (/* unused pure expression or super */ null && (`(?:src/)?${MIDDLEWARE_FILENAME}`)); // Pattern to detect instrumentation hooks file const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias const PAGES_DIR_ALIAS = 'private-next-pages'; const DOT_NEXT_ALIAS = 'private-dot-next'; const ROOT_DIR_ALIAS = 'private-next-root-dir'; const APP_DIR_ALIAS = 'private-next-app-dir'; const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; const PUBLIC_DIR_MIDDLEWARE_CONFLICT = (/* unused pure expression or super */ null && (`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`)); const SSG_GET_INITIAL_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`)); const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`)); const SERVER_PROPS_SSG_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`)); const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = (/* unused pure expression or super */ null && (`can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`)); const SERVER_PROPS_EXPORT_ERROR = (/* unused pure expression or super */ null && (`pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`)); const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; const UNSTABLE_REVALIDATE_RENAME_ERROR = (/* unused pure expression or super */ null && ('The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.')); const GSSP_COMPONENT_MEMBER_ERROR = (/* unused pure expression or super */ null && (`can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`)); const NON_STANDARD_NODE_ENV = (/* unused pure expression or super */ null && (`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`)); const SSG_FALLBACK_EXPORT_ERROR = (/* unused pure expression or super */ null && (`Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`)); const ESLINT_DEFAULT_DIRS = (/* unused pure expression or super */ null && ([ 'app', 'pages', 'components', 'lib', 'src' ])); const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/server/web/utils.js /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js /** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/server/web/next-url.js const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !undefined, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js //# sourceMappingURL=cookies.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (false) {} if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new _edge_runtime_cookies.RequestCookies(this.headers), nextUrl, url: false ? 0 : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js const response_INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new _edge_runtime_cookies.ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof _edge_runtime_cookies.ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>(0,_edge_runtime_cookies.stringifyCookie)(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[response_INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[response_INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js /** * The result of parsing a URL relative to a base URL. */ function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/server/internal-utils.js const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js /** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/segment.js function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } const PAGE_SEGMENT_KEY = '__PAGE__'; const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js /** * @internal */ class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function async_local_storage_createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js const workAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=work-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js /** * @internal */ class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } class request_cookies_RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorageInstance.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } function request_cookies_responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js /** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var constants_NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(constants_NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js /** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (true) { api = __webpack_require__(817); } else {} const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const tracer_getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); //# sourceMappingURL=tracer.js.map ;// ./node_modules/next/dist/esm/server/api-utils/index.js function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; const RESPONSE_LIMIT_DEFAULT = (/* unused pure expression or super */ null && (4 * 1024 * 1024)); const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = __webpack_require__(663); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. false && 0)); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.map ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new _edge_runtime_cookies.ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = request_cookies_RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js const workUnitAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const app_router_headers_RSC_HEADER = 'rsc'; const app_router_headers_ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const app_router_headers_NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const app_router_headers_NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const components_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const app_router_headers_NEXT_URL = 'next-url'; const app_router_headers_RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const app_router_headers_FLIGHT_HEADERS = [ app_router_headers_RSC_HEADER, app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER, app_router_headers_NEXT_ROUTER_PREFETCH_HEADER, app_router_headers_NEXT_HMR_REFRESH_HEADER, app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const app_router_headers_NEXT_RSC_UNION_QUERY = '_rsc'; const app_router_headers_NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const app_router_headers_NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const app_router_headers_NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const app_router_headers_NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const app_router_headers_NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const app_router_headers_NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js // Share the instance module in the next-shared layer function work_unit_async_storage_external_throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function work_unit_async_storage_external_getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class lib_invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js /** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.map ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. const tagsManifest = new Map(); const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js /* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; /** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const default_external_DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; /* harmony default export */ const default_external = ((/* unused pure expression or super */ null && (default_external_DefaultCacheHandler))); //# sourceMappingURL=default.external.js.map ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js const handlers_debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { handlers_debug == null ? void 0 : handlers_debug('cache handlers already initialized'); return false; } handlers_debug == null ? void 0 : handlers_debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } handlers_debug == null ? void 0 : handlers_debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map ;// ./node_modules/next/dist/esm/server/revalidation-utils.js /** Run a callback, and execute any *new* revalidations added during its runtime. */ async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const async_local_storage_sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class async_local_storage_FakeAsyncLocalStorage { disable() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } exit() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const async_local_storage_maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function app_render_async_local_storage_createAsyncLocalStorage() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return new async_local_storage_maybeGlobalAsyncLocalStorage(); } return new async_local_storage_FakeAsyncLocalStorage(); } function async_local_storage_bindSnapshot(fn) { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.bind(fn); } return async_local_storage_FakeAsyncLocalStorage.bind(fn); } function async_local_storage_createSnapshot() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js const afterTaskAsyncStorageInstance = app_render_async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=after-task-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/after/after-context.js class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new (p_queue_default())(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorageInstance.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorageInstance.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = async_local_storage_bindSnapshot(async ()=>{ try { await afterTaskAsyncStorageInstance.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorageInstance.getStore(); if (!workStore) { throw Object.defineProperty(new lib_invariant_error_InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new lib_invariant_error_InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js /** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.map ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: async_local_storage_createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map ;// ./node_modules/next/dist/esm/server/web/web-on-close.js /** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.map ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js /** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js /** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map ;// ./node_modules/next/dist/esm/server/web/adapter.js class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = tracer_getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm __webpack_require__(720); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = false ? 0 : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: "production" !== 'development', fetchCacheKeyPrefix: "", dev: "production" === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return tracer_getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorageInstance.run(workStore, ()=>workUnitAsyncStorageInstance.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if ( true && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !( false && 0)) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (true) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js const GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; //# sourceMappingURL=url-pattern.js.map ;// ./node_modules/next/dist/esm/server/after/after.js /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map ;// ./node_modules/next/dist/esm/server/after/index.js //# sourceMappingURL=index.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class hooks_server_context_DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class static_generation_bailout_StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ function dynamic_rendering_utils_makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js // This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ class bailout_to_csr_BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js /** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly const hasPostpone = typeof react_react_server.unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return dynamic_rendering_postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if (false) {} break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ function dynamic_rendering_throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ function dynamic_rendering_trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if (false) {} break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport const trackSynchronousRequestDataAccessInDev = (/* unused pure expression or super */ null && (trackSynchronousPlatformIOAccessInDev)); function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; dynamic_rendering_postponeWithTracking(route, reason, dynamicTracking); } function dynamic_rendering_postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return dynamic_rendering_postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = false ? 0 : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map ;// ./node_modules/next/dist/esm/server/request/utils.js function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } function utils_isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/request/connection.js /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if (false) {} else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js // This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; function reflect_utils_describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } const reflect_utils_wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js const actionAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=action-async-storage.external.js.map ;// ./node_modules/next/dist/esm/lib/picocolors.js // 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'); 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; }; }; const picocolors_reset = (/* unused pure expression or super */ null && (enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String)); const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m'); const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m'); const italic = formatter('\x1b[3m', '\x1b[23m'); const underline = formatter('\x1b[4m', '\x1b[24m'); const inverse = formatter('\x1b[7m', '\x1b[27m'); const picocolors_hidden = formatter('\x1b[8m', '\x1b[28m'); const strikethrough = formatter('\x1b[9m', '\x1b[29m'); const black = formatter('\x1b[30m', '\x1b[39m'); const red = formatter('\x1b[31m', '\x1b[39m'); const green = formatter('\x1b[32m', '\x1b[39m'); const yellow = formatter('\x1b[33m', '\x1b[39m'); const blue = formatter('\x1b[34m', '\x1b[39m'); const magenta = formatter('\x1b[35m', '\x1b[39m'); const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m'); const cyan = formatter('\x1b[36m', '\x1b[39m'); const white = formatter('\x1b[37m', '\x1b[39m'); const gray = formatter('\x1b[90m', '\x1b[39m'); const bgBlack = formatter('\x1b[40m', '\x1b[49m'); const bgRed = formatter('\x1b[41m', '\x1b[49m'); const bgGreen = formatter('\x1b[42m', '\x1b[49m'); const bgYellow = formatter('\x1b[43m', '\x1b[49m'); const bgBlue = formatter('\x1b[44m', '\x1b[49m'); const bgMagenta = formatter('\x1b[45m', '\x1b[49m'); const bgCyan = formatter('\x1b[46m', '\x1b[49m'); const bgWhite = formatter('\x1b[47m', '\x1b[49m'); //# sourceMappingURL=picocolors.js.map ;// ./node_modules/next/dist/esm/build/output/log.js const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } function wait(...message) { prefixedLog('wait', ...message); } function error(...message) { prefixedLog('error', ...message); } function warn(...message) { prefixedLog('warn', ...message); } function ready(...message) { prefixedLog('ready', ...message); } function info(...message) { prefixedLog('info', ...message); } function log_event(...message) { prefixedLog('event', ...message); } function log_trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); function log_warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map ;// ./node_modules/next/dist/esm/server/request/root-params.js const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map ;// ./node_modules/next/dist/esm/server/web/exports/index.js // Alias index file of next/server for edge runtime for tree-shaking purpose //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/api/server.js //# sourceMappingURL=server.js.map ;// ./src/middleware.js const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } const config = { matcher: "/api/:path*" }; ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ function http_access_fallback_isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js var redirect_status_code_RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-error.js const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ function redirect_error_isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19! // Import the userland code. const mod = { ...middleware_namespaceObject }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (false) {} const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesx;;;;;;;;;;;;;;;;;;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEA,mC;;ACrGO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA,iC;;AC3BO;AACA,6CAA6C;AAC7C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACO;AACA;AACA;AACA;AACP;AACO;AACP;AACA;AACA;AACO;AACP;AACO;AACA,mCAAmC,4DAAY,oBAAoB,CAAC;AAC3E;AACO;AACP;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+NAA+K;AACtN,uCAAuC,qJAAqG;AAC5I,6CAA6C,yIAAyF;AACtI,kCAAkC,wKAAwH;AAC1J,mDAAmD,yJAAyG;AAC5J,kCAAkC,yKAAyH;AAC3J;AACA;AACA,yCAAyC,yJAAyG;AAClJ,oCAAoC,0MAA0J;AAC9L,8BAA8B,mQAAmN;AACjP,kCAAkC,0MAA0J;AAC5L,4BAA4B;AACnC;AACA;AACA;AACA;AACA;AACA,CAAC;AACM;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD,qC;;ACvK+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,yDAAyD;AACzD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN,mEAAmE,YAAY;AAC/E;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA,QAAQ,uBAAuB;AAC/B,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iC;;AChJ8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gHAAgH;AAChH;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,uC;;ACzEO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,KAAM,gBAAXF,aAAaG,KAAK,CAAC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cAAc,EAAE;gBACzBmC,KAAK1B,MAAM,GAAG2D,OAAOpE,cAAc;YACrC;QACF;IACF;IACA,OAAOmC;AACT;;;AC9GgF;AACiB;AACrC;AAC+B;AAC3F,qGAAqG,EAAE;AACvG;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA,wBAAwB,SAA8C;AACtE;AACA,SAAS;AACT,yBAAyB,WAAW;AACpC,+IAA+I,kBAAkB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;;;ACxL4G;;AAE5G,mC;;ACFsC;AAC4B;AACN;AACjB;AACpC;AACP;AACA;AACA;AACA;AACA,IAAW;AACX,gCAAgC;AAChC;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA;AACA,YAAY,KAAmC,EAAE,EAIxC;AACT;AACA;AACA,4BAA4B,OAAO;AACnC,qBAAqB,yBAAyB;AAC9C;AACA,SAAS;AACT;AACA,yBAAyB,oCAAc;AACvC;AACA,iBAAiB,MAA8C,GAAG,CAAG;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;;AAEA,mC;;AChFO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACnBmE;AAC7B;AAC4B;AACd;AACR;AAC5C,MAAM,kBAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX,+BAA+B;AAC/B;AACA;AACA,4BAA4B,qCAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,qCAAe;AACrE,yGAAyG,yCAAe;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT,aAAa,kBAAS;AACtB;AACA,gCAAgC,OAAO;AACvC,yBAAyB,yBAAyB;AAClD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AcA,CAAC3C,UAAU;YAC3B,OAAOpC;QACT;QAEA,iCAAiC;QACjC,IAAIoC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOpC;QACT;QAEA,uDAAuD;QACvD,IACGoC,CAAAA,YAAY,UAAUA,YAAY,QAAM,IACzCC,UAAUF,SAASG,MAAM,GAAG,GAC5B;YACA,OAAOtC;QACT;QAEA,OAAUA,WAAS,MAAGoC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACM,SAASwD,gBAAgBvC,GAAW;IACzC,OAAOA,IAAI5D,OAAO,CAChB,eACA;AAGJ;;;AC/D2C;AAC3C;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;AC3KA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2CAAuB;AACvC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+C;;AChDgE;AACzD,iCAAiC,2CAAuB;;AAE/D,uD;;ACHA;AAGE;AACsD;;AAExD,uD;;ACN4C;AACC;AACF;AACwC;AACnF;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,qCAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qCAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,+CAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA,2C;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA,CAAC,iBAAiB;AAClB,IAAI,kBAAQ;AACZ;AACA;AACA,CAAC,CAAC,kBAAQ,MAAM;AAChB;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACsN;;AAEtN,qC;;ACvIA;;;;;CAKC,GACM,SAASoG,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B;;;ACfyE;AACZ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAmC;AACvC,UAAU,mBAAO,CAAC,GAAoB;AACtC,EAAE,KAAK,EAMN;AACD,QAAQ,sEAAsE;AACvE;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B,QAAQ,oFAAoF;AACxK;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAS;AACf;AACA;AACA,CAAC;AAC8C;;AAE/C,kC;;ACvOwE;AACsC;AAC9D;AACE;AAC3C;AACP;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP,oBAAoB,cAAc;AAClC,sCAAsC,2BAA2B;AACjE;AACA,gDAAgD,0CAA0C;AAC1F;AACA;AACA;AACA;AACA;AACO;AACA;AACA,+BAA+B,+DAAe;AAC9C;AACA;AACA,2CAA2C;AAClD;AACA;AACA;AACA,YAAY,YAAY,EAAE,mBAAO,CAAC,GAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW,uBAAuB,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEA,iC;;AC3JuF;AAChF;AACP;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E,wDAAwD,4BAA4B;AACpF;AACA,QAAQ,MAAqC,IAAI,CAA+C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA,+C;;ACnD4E;AACJ;AACmH;AAC3G;AACtB;AACR;AAClD;AACA,oBAAoB,cAAc;AAClC,yBAAyB,cAAc;AACvC;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA,wBAAwB,oCAAc,CAAC,cAAc;AACrD,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,oCAAc,CAAC,cAAc;AACxE;AACA;AACA;AACA,gCAAgC,qCAAqB;AACrD;AACA;AACA,SAA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AAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;ACRA;AAGE;AACwF;AACxB;AACF;AACzD,SAAS,4DAA2B;AAC3C,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uDAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4D;;;;;AD1LO,MAAMJ,kCAAcA,SAASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;AERA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qC;;ACnMA,+EAA+E;AAC/E,qBAAqB;AACd,MAAMC,eAAe,IAAIC,MAAqB;AAE9C,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAarE,GAAG,CAAC0E;QAEvC,IA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;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,IAAI,cAAK,oBAAoB,cAAK;AAClC;AACA;AACA;;AAEA,oC;;AC1GwD;AACxD,qFAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8C;;ACjEA,MAAM,4DAAwC;AAC9C;AACA;AACA;AACA,CAAC;AACD,MAAM,yCAAqB;AAC3B;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,MAAM,gDAA4B;AAC3B,SAAS,sDAAuB;AACvC,QAAQ,gDAA4B;AACpC,mBAAmB,gDAA4B;AAC/C;AACA,eAAe,yCAAqB;AACpC;AACO,SAAS,gCAAY;AAC5B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA,WAAW,yCAAqB;AAChC;AACO,SAAS,kCAAc;AAC9B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA;AACA;AACA;AACA;;AAEA,+C;;AChDgE;AACzD,sCAAsC,sDAAuB;;AAEpE,6D;;ACHA;AAGE;AAC+B;;AAEjC,6D;;ACNsD;AACY;AACR;AACmB;AACd;AACE;AACqB;AACE;AACjF;AACP,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA,iCAAiC,mBAAY;AAC7C;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAAoB;AAClD;AACA;AACA;AACA,+BAA+B,6BAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAY;AAC5C;AACA,sBAAsB,6BAAqB;AAC3C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAgB;AAC1C;AACA,4CAA4C,kCAAc;AAC1D;AACA;AACA;AACA,aAAa;AACb;AACA,eAAe,sBAAsB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,wDAAwD,kCAAc;AACtE;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,yC;;AC1HA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEA,uC;;AC3BsD;AACqB;AACrB;AACS;AACI;AAC5D,2BAA2B,yEAAyE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kCAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD,eAAe,YAAY;AAC3B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;;AAEA,sC;;AClFA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yDAAyD,UAAU,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wC;;AC5DA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA,kD;;ACZ4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA,mD;;AClBiE;AACF;AACd;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,sCAAsC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B,CAAC,EAAE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B,CAAC,EAAE,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yC;;AC5DA;AACA;AACA,kCAAkC;AAClC,IAAW;AACX;AACA;;AAEA,0C;;ACP6C;AACkC;AACa;AACrC;AACE;AACuC;AAC3D;AACyB;AACY;AAC6F;AAC3G;AACc;AACY;AACxB;AACe;AACY;AACzC;AACQ;AACP;AACc;AACa;AACrB;AACI;AACpD,8BAA8B,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D,YAAY,mBAAO,CAAC,GAA6C;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA,yBAAyB,eAAe;AACxC,gFAAgF,OAAO;AACvF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA,yBAAyB,kBAAkB,oBAAoB,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAA8C,GAAG,CAA2B;AACrG,kDAAkD,oBAAoB;AACtE;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAoB;AAC7C,iCAAiC,EAAyC;AAC1E,iBAAiB,YAAoB;AACrC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,qCAAqC;AACrC;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qFAAqF,wBAAwB;AAC7G,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD,mBAAmB,gBAAS,SAAS,cAAc;AACnD,wCAAwC,gBAAgB,EAAE,yBAAyB;AACnF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D,yCAAyC,wBAAwB;AACjE,sCAAsC,eAAe;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,yBAAyB;AACzB,+DAA+D,2BAA2B;AAC1F;AACA;AACA,qBAAqB;AACrB,iCAAiC,wBAAgB,oBAAoB,4BAAoB;AACzF,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT,YAAY,KAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC,EAAE,gBAAgB;AACzE;AACA;AACA;AACA,UAAU,MAAsD,IAAI,CAA0C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA,qCAAqC,2BAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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7D;;;ACfsC;AACiB;AACvD;AACgE;AACiB;AACI;AACrF;AACA,OAAO,0BAAI;AACX;AACA;AACA;AACA;AACA,6DAA6D,KAAK;AAClE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,gBAAgB,KAAqC,EAAE,EAK1C;AACb;AACA;AACA;AACA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACe;AACf,WAAW,OAAO;AAClB;AACA;AACA;AACA,KAAK;AACL;;AAEA`UUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewarePwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middlewarewebpack://../../../../src/shared/lib/i18n/detect-domain-locale.tswebpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.tswebpack://../../../../../src/shared/lib/router/utils/parse-path.tswebpack://../../../../../src/shared/lib/router/utils/add-path-prefix.tswebpack://../../../../../src/shared/lib/router/utils/add-path-suffix.tswebpack://../../../../../src/shared/lib/router/utils/path-has-prefix.tswebpack://../../../../../src/shared/lib/router/utils/add-locale.tswebpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.tswebpack://../../../src/shared/lib/get-hostname.tswebpack://../../../../src/shared/lib/i18n/normalize-locale-path.tswebpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.tswebpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.tsVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middlewaremwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middlewareewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middlewarewebpack://../../../../../src/shared/lib/router/utils/relativize-url.tswebpack://../../../src/client/components/app-router-headers.tsXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middlewarewebpack://../../../../src/shared/lib/page-path/ensure-leading-slash.tswebpack://../../../src/shared/lib/segment.tswebpack://../../../../../src/shared/lib/router/utils/app-paths.tsmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middlewarewebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|sharedwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared!webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shareduwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middlewarewebpack://../../../src/shared/lib/is-thenable.tsZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middlewareYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middlewarekwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middlewareewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middlewarewebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|sharedwebpack://../../../src/shared/lib/invariant-error.ts&webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|sharedWwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middlewarewebpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.tswebpack://../../../../src/server/lib/cache-handlers/default.external.ts\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middlewarevwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middlewarevwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middlewareYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middlewarebwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middlewareZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middlewaregwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middlewaregwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middlewarewebpack://../../../src/client/components/hooks-server-context.tswebpack://../../../src/client/components/static-generation-bailout.tsawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middlewarecwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middlewarewebpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.tswebpack://../../../src/server/app-render/dynamic-rendering.tswebpack://../../../src/server/request/utils.tswebpack://../../../src/server/request/connection.tswebpack://../../../../src/shared/lib/utils/reflect-utils.tswebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|sharedQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middlewarewebpack://../../../src/server/request/root-params.ts[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middlewareMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middlewarewebpack://./src/middleware.jswebpack://../../../../src/client/components/http-access-fallback/http-access-fallback.tswebpack://../../../src/client/components/redirect-status-code.tswebpack://../../../src/client/components/redirect-error.tswebpack://../../../src/client/components/is-next-router-error.tswebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware`Uexport async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } export async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; export function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (process.env.NEXT_RUNTIME !== 'edge') { return; } // The condition is true when the "process" module is provided if (process !== global.process) { // prefer local process but global.process has correct "env" process.env = global.process.env; global.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.mapSexport class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } export class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } export class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; export const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; export const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; export const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; export const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; export const MATCHED_PATH_HEADER = 'x-matched-path'; export const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; export const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; export const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; export const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; export const RSC_SEGMENT_SUFFIX = '.segment.rsc'; export const RSC_SUFFIX = '.rsc'; export const ACTION_SUFFIX = '.action'; export const NEXT_DATA_SUFFIX = '.json'; export const NEXT_META_SUFFIX = '.meta'; export const NEXT_BODY_SUFFIX = '.body'; export const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; export const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; export const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; export const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well export const NEXT_CACHE_TAG_MAX_ITEMS = 128; export const NEXT_CACHE_TAG_MAX_LENGTH = 256; export const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; export const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds export const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. export const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files export const MIDDLEWARE_FILENAME = 'middleware'; export const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`; // Pattern to detect instrumentation hooks file export const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias export const PAGES_DIR_ALIAS = 'private-next-pages'; export const DOT_NEXT_ALIAS = 'private-dot-next'; export const ROOT_DIR_ALIAS = 'private-next-root-dir'; export const APP_DIR_ALIAS = 'private-next-app-dir'; export const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; export const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; export const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; export const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; export const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; export const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; export const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`; export const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`; export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`; export const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`; export const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`; export const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`; export const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; export const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; export const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.'; export const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`; export const NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`; export const SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`; export const ESLINT_DEFAULT_DIRS = [ 'app', 'pages', 'components', 'lib', 'src' ]; export const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; export { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }; //# sourceMappingURL=constants.js.mapimport { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants'; /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ export function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ export function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ export function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ export function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map import { PageSignatureError } from '../error'; const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } export function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } export class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.mapimport type { DomainLocale } from '../../../server/config-shared' export function detectDomainLocale( domainItems?: readonly DomainLocale[], hostname?: string, detectedLocale?: string ) { if (!domainItems) return if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase() } for (const item of domainItems) { // remove port if present const domainHostname = item.domain?.split(':', 1)[0].toLowerCase() if ( hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale) ) { return item } } } /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route: string) { return route.replace(/\/$/, '') || '/' } /** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path: string) { const hashIndex = path.indexOf('#') const queryIndex = path.indexOf('?') const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex) if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '', } } return { pathname: path, query: '', hash: '' } } import { parsePath } from './parse-path' /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path: string, prefix?: string) { if (!path.startsWith('/') || !prefix) { return path } const { pathname, query, hash } = parsePath(path) return `${prefix}${pathname}${query}${hash}` } import { parsePath } from './parse-path' /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path: string, suffix?: string) { if (!path.startsWith('/') || !suffix) { return path } const { pathname, query, hash } = parsePath(path) return `${pathname}${suffix}${query}${hash}` } )import { parsePath } from './parse-path' /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path: string, prefix: string) { if (typeof path !== 'string') { return false } const { pathname } = parsePath(path) return pathname === prefix || pathname.startsWith(prefix + '/') } import { addPathPrefix } from './add-path-prefix' import { pathHasPrefix } from './path-has-prefix' /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale( path: string, locale?: string | false, defaultLocale?: string, ignorePrefix?: boolean ) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path const lower = path.toLowerCase() // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path } // Add the locale prefix to the path. return addPathPrefix(path, `/${locale}`) } +import type { NextPathnameInfo } from './get-next-pathname-info' import { removeTrailingSlash } from './remove-trailing-slash' import { addPathPrefix } from './add-path-prefix' import { addPathSuffix } from './add-path-suffix' import { addLocale } from './add-locale' interface ExtendedInfo extends NextPathnameInfo { defaultLocale?: string ignorePrefix?: boolean } export function formatNextPathnameInfo(info: ExtendedInfo) { let pathname = addLocale( info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix ) if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname) } if (info.buildId) { pathname = addPathSuffix( addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json' ) } pathname = addPathPrefix(pathname, info.basePath) return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname) } import type { OutgoingHttpHeaders } from 'http' /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname( parsed: { hostname?: string | null }, headers?: OutgoingHttpHeaders ): string | undefined { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname: string if (headers?.host && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0] } else if (parsed.hostname) { hostname = parsed.hostname } else return return hostname.toLowerCase() } export interface PathLocale { detectedLocale?: string pathname: string } /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap() /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath( pathname: string, locales?: readonly string[] ): PathLocale { // If locales is undefined, return the pathname as is. if (!locales) return { pathname } // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales) if (!lowercasedLocales) { lowercasedLocales = locales.map((locale) => locale.toLowerCase()) cache.set(locales, lowercasedLocales) } let detectedLocale: string | undefined // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2) // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname } // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase() // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment) if (index < 0) return { pathname } // Return the case-sensitive locale. detectedLocale = locales[index] // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/' return { pathname, detectedLocale } } import { pathHasPrefix } from './path-has-prefix' /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path: string, prefix: string): string { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length) // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return `/${withoutPrefix}` } [ import { normalizeLocalePath } from '../../i18n/normalize-locale-path' import { removePathPrefix } from './remove-path-prefix' import { pathHasPrefix } from './path-has-prefix' import type { I18NProvider } from '../../../../server/lib/i18n-provider' export interface NextPathnameInfo { /** * The base path in case the pathname included it. */ basePath?: string /** * The buildId for when the parsed URL is a data URL. Parsing it can be * disabled with the `parseData` option. */ buildId?: string /** * If there was a locale in the pathname, this will hold its value. */ locale?: string /** * The processed pathname without a base path, locale, or data URL elements * when parsing it is enabled. */ pathname: string /** * A boolean telling if the pathname had a trailingSlash. This can be only * true if trailingSlash is enabled. */ trailingSlash?: boolean } interface Options { /** * When passed to true, this function will also parse Nextjs data URLs. */ parseData?: boolean /** * A partial of the Next.js configuration to parse the URL. */ nextConfig?: { basePath?: string i18n?: { locales?: readonly string[] } | null trailingSlash?: boolean } /** * If provided, this normalizer will be used to detect the locale instead of * the default locale detection. */ i18nProvider?: I18NProvider } export function getNextPathnameInfo( pathname: string, options: Options ): NextPathnameInfo { const { basePath, i18n, trailingSlash } = options.nextConfig ?? {} const info: NextPathnameInfo = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash, } if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath) info.basePath = basePath } let pathnameNoDataPrefix = info.pathname if ( info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json') ) { const paths = info.pathname .replace(/^\/_next\/data\//, '') .replace(/\.json$/, '') .split('/') const buildId = paths[0] info.buildId = buildId pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/' // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales) info.locale = result.detectedLocale info.pathname = result.pathname ?? info.pathname if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales) if (result.detectedLocale) { info.locale = result.detectedLocale } } } return info } import { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'; import { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'; import { getHostname } from '../../shared/lib/get-hostname'; import { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'; const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); export class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.mapexport { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies'; //# sourceMappingURL=cookies.js.map import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { RemovedUAError, RemovedPageError } from '../error'; import { RequestCookies } from './cookies'; export const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ export class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (process.env.NEXT_RUNTIME !== 'edge') { if (init.body && init.duplex !== 'half') { init.duplex = 'half'; } } if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new RequestCookies(this.headers), nextUrl, url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.mapEexport class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map|import { stringifyCookie } from '../../web/spec-extension/cookies'; import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { ReflectAdapter } from './adapters/reflect'; import { ResponseCookies } from './cookies'; const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ export class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.mapG/** * The result of parsing a URL relative to a base URL. */ export type RelativeURL = { /** * The relative URL. Either a URL including the origin or a relative URL. */ url: string /** * Whether the URL is relative to the base URL. */ isRelative: boolean } export function parseRelativeURL( url: string | URL, base: string | URL ): RelativeURL { const baseURL = typeof base === 'string' ? new URL(base) : base const relative = new URL(url, base) // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative, } } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url: string | URL, base: string | URL): string { const relative = parseRelativeURL(url, base) return relative.url } export const RSC_HEADER = 'rsc' as const export const ACTION_HEADER = 'next-action' as const // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch' as const export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const export const NEXT_URL = 'next-url' as const export const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, ] as const export const NEXT_RSC_UNION_QUERY = '_rsc' as const export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const Bimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'; const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; export function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } export function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path: string) { return path.startsWith('/') ? path : `/${path}` } @import type { Segment } from '../../server/app-render/types' export function isGroupSegment(segment: string) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')') } export function isParallelRouteSegment(segment: string) { return segment.startsWith('@') && segment !== '@children' } export function addSearchParamsIfPageSegment( segment: Segment, searchParams: Record ) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY) if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams) return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY } return segment } export const PAGE_SEGMENT_KEY = '__PAGE__' export const DEFAULT_SEGMENT_KEY = '__DEFAULT__' import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash' import { isGroupSegment } from '../../segment' /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route: string) { return ensureLeadingSlash( route.split('/').reduce((pathname, segment, index, segments) => { // Empty segments are ignored. if (!segment) { return pathname } // Groups are ignored. if (isGroupSegment(segment)) { return pathname } // Parallel segments are ignored. if (segment[0] === '@') { return pathname } // The last segment (if it's a leaf) should be ignored. if ( (segment === 'page' || segment === 'route') && index === segments.length - 1 ) { return pathname } return `${pathname}/${segment}` }, '') ) } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url: string) { return url.replace( /\.rsc($|\?)/, // $1 ensures `?` is preserved '$1' ) } Jimport { ReflectAdapter } from './reflect'; /** * @internal */ export class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } export class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.mapconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const workAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map$// Share the instance module in the next-shared layer import { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { workAsyncStorageInstance as workAsyncStorage }; //# sourceMappingURL=work-async-storage.external.js.mapimport { RequestCookies } from '../cookies'; import { ResponseCookies } from '../cookies'; import { ReflectAdapter } from './reflect'; import { workAsyncStorage } from '../../../app-render/work-async-storage.external'; /** * @internal */ export class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } export class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); export function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } export function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } export class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorage.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } export function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } export function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } export function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.mapY/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user export const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set export const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); export { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, }; //# sourceMappingURL=constants.js.mapr/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable( promise: Promise | T ): promise is Promise { return ( promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function' ) } $import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'; import { isThenable } from '../../../shared/lib/is-thenable'; const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (process.env.NEXT_RUNTIME === 'edge') { api = require('@opentelemetry/api'); } else { try { api = require('@opentelemetry/api'); } catch (err) { api = require('next/dist/compiled/@opentelemetry/api'); } } const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; export class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } export function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); export { getTracer, SpanStatusCode, SpanKind }; //# sourceMappingURL=tracer.js.mapimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants'; import { getTracer } from '../lib/trace/tracer'; import { NodeSpan } from '../lib/trace/constants'; export function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ export function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ export function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } export function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } export const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; export const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; export const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; export const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); export const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); export function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = require('next/dist/compiled/cookie'); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ export class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ export function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ export function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils'; export class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id')); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.mapimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'; import { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies'; import { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'; import { DraftModeProvider } from './draft-mode-provider'; import { splitCookiesString } from '../web/utils'; function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } export function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } export function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } export function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const workUnitAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.map export class InvariantError extends Error { constructor(message: string, options?: ErrorOptions) { super( `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`, options ) this.name = 'InvariantError' } } // Share the instance module in the next-shared layer import { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; import { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'; import { InvariantError } from '../../shared/lib/invariant-error'; export { workUnitAsyncStorageInstance as workUnitAsyncStorage }; export function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } export function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } export function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } export function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } export function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } export function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } export function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ export class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.mapimport type { Timestamp } from '../cache-handlers/types' // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map() export const isStale = (tags: string[], timestamp: Timestamp) => { for (const tag of tags) { const revalidatedAt = tagsManifest.get(tag) if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true } } return false } */** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache' import type { CacheEntry, CacheHandlerV2 } from './types' import { isStale, tagsManifest, } from '../incremental-cache/tags-manifest.external' type PrivateCacheEntry = { entry: CacheEntry // For the default cache we store errored cache // entries and allow them to be used up to 3 times // after that we want to dispose it and try for fresh // If an entry is errored we return no entry // three times so that we retry hitting origin (MISS) // and then if it still fails to set after the third we // return the errored content and use expiration of // Math.min(30, entry.expiration) isErrored: boolean errorRetryCount: number // compute size on set since we need to read size // of the ReadableStream for LRU evicting size: number } // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache( 50 * 1024 * 1024, (entry) => entry.size ) const pendingSets = new Map>() const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined const DefaultCacheHandler: CacheHandlerV2 = { async get(cacheKey) { const pendingPromise = pendingSets.get(cacheKey) if (pendingPromise) { debug?.('get', cacheKey, 'pending') await pendingPromise } const privateEntry = memoryCache.get(cacheKey) if (!privateEntry) { debug?.('get', cacheKey, 'not found') return undefined } const entry = privateEntry.entry if ( performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000 ) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug?.('get', cacheKey, 'expired') return undefined } if (isStale(entry.tags, entry.timestamp)) { debug?.('get', cacheKey, 'had stale tag') return undefined } const [returnStream, newSaved] = entry.value.tee() entry.value = newSaved debug?.('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire, }) return { ...entry, value: returnStream, } }, async set(cacheKey, pendingEntry) { debug?.('set', cacheKey, 'start') let resolvePending: () => void = () => {} const pendingPromise = new Promise((resolve) => { resolvePending = resolve }) pendingSets.set(cacheKey, pendingPromise) const entry = await pendingEntry let size = 0 try { const [value, clonedValue] = entry.value.tee() entry.value = value const reader = clonedValue.getReader() for (let chunk; !(chunk = await reader.read()).done; ) { size += Buffer.from(chunk.value).byteLength } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size, }) debug?.('set', cacheKey, 'done') } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug?.('set', cacheKey, 'failed', err) } finally { resolvePending() pendingSets.delete(cacheKey) } }, async refreshTags() { // Nothing to do for an in-memory cache handler. }, async getExpiration(...tags) { const expiration = Math.max( ...tags.map((tag) => tagsManifest.get(tag) ?? 0) ) debug?.('getExpiration', { tags, expiration }) return expiration }, async expireTags(...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()) debug?.('expireTags', { tags, timestamp }) for (const tag of tags) { // TODO: update file-system-cache? tagsManifest.set(tag, timestamp) } }, } export default DefaultCacheHandler import DefaultCacheHandler from '../lib/cache-handlers/default.external'; const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ export function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ export function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ export function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ export function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ export function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.mape import { getCacheHandlers } from './use-cache/handlers'; /** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } export async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const afterTaskAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.map7// Share the instance module in the next-shared layer import { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { afterTaskAsyncStorage }; //# sourceMappingURL=after-task-async-storage.external.js.mapimport PromiseQueue from 'next/dist/compiled/p-queue'; import { InvariantError } from '../../shared/lib/invariant-error'; import { isThenable } from '../../shared/lib/is-thenable'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { withExecuteRevalidates } from '../revalidation-utils'; import { bindSnapshot } from '../app-render/async-local-storage'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new PromiseQueue(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorage.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorage.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = bindSnapshot(async ()=>{ try { await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ export function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } export function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.mapimport { AfterContext } from '../after/after-context'; import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { createLazyResult } from '../lib/lazy-result'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createSnapshot } from '../app-render/async-local-storage'; export function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ export function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } export function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } export class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.mapF/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ export function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.mapRimport { createAsyncLocalStorage } from '../app-render/async-local-storage'; export function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ export function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ export function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map Fimport { PageSignatureError } from './error'; import { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'; import { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event'; import { NextRequest } from './spec-extension/request'; import { NextResponse } from './spec-extension/response'; import { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url'; import { NextURL } from './next-url'; import { stripInternalSearchParams } from '../internal-utils'; import { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'; import { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers'; import { ensureInstrumentationRegistered } from './globals'; import { createRequestStoreForAPI } from '../async-storage/request-store'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { createWorkStore } from '../async-storage/work-store'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'; import { getTracer } from '../lib/trace/tracer'; import { MiddlewareSpan } from '../lib/trace/constants'; import { CloseController } from './web-on-close'; import { getEdgePreviewProps } from './get-edge-preview-props'; import { getBuiltinRequestContext } from '../after/builtin-request-context'; import { getImplicitTags } from '../lib/implicit-tags'; import { isRSCRequestHeader } from '../lib/is-rsc-request'; export class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm require('next/dist/experimental/testmode/server-edge'); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } export async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: process.env.NODE_ENV !== 'development', fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX, dev: process.env.NODE_ENV === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\/\//))) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map import parseua from 'next/dist/compiled/ua-parser-js'; export function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } export function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } export function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.mapconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; export { GlobalURLPattern as URLPattern }; //# sourceMappingURL=url-pattern.js.map)import { workAsyncStorage } from '../app-render/work-async-storage.external'; /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ export function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map;export * from './after'; //# sourceMappingURL=index.js.mapconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE' export class DynamicServerError extends Error { digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE constructor(public readonly description: string) { super(`Dynamic server usage: ${description}`) } } export function isDynamicServerError(err: unknown): err is DynamicServerError { if ( typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string' ) { return false } return err.digest === DYNAMIC_ERROR_CODE } const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT' export class StaticGenBailoutError extends Error { public readonly code = NEXT_STATIC_GEN_BAILOUT } export function isStaticGenBailoutError( error: unknown ): error is StaticGenBailoutError { if (typeof error !== 'object' || error === null || !('code' in error)) { return false } return error.code === NEXT_STATIC_GEN_BAILOUT }  export function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ export function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} export function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.mapAexport const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; export const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; export const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; export const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING' /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { public readonly digest = BAILOUT_TO_CSR constructor(public readonly reason: string) { super(`Bail out to client-side rendering: ${reason}`) } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err: unknown): err is BailoutToCSRError { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false } return err.digest === BAILOUT_TO_CSR } x/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ import type { WorkStore } from '../app-render/work-async-storage.external' import type { WorkUnitStore, RequestStore, PrerenderStoreLegacy, PrerenderStoreModern, PrerenderStoreModernRuntime, } from '../app-render/work-unit-async-storage.external' // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react' import { DynamicServerError } from '../../client/components/hooks-server-context' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { getRuntimeStagePromise, workUnitAsyncStorage, } from './work-unit-async-storage.external' import { workAsyncStorage } from '../app-render/work-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME, } from '../../lib/framework/boundary-constants' import { scheduleOnNextTick } from '../../lib/scheduler' import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr' import { InvariantError } from '../../shared/lib/invariant-error' const hasPostpone = typeof React.unstable_postpone === 'function' export type DynamicAccess = { /** * If debugging, this will contain the stack trace of where the dynamic access * occurred. This is used to provide more information to the user about why * their page is being rendered dynamically. */ stack?: string /** * The expression that was accessed dynamically. */ expression: string } // Stores dynamic reasons used during an RSC render. export type DynamicTrackingState = { /** * When true, stack information will also be tracked during dynamic access. */ readonly isDebugDynamicAccesses: boolean | undefined /** * The dynamic accesses that occurred during the render. */ readonly dynamicAccesses: Array syncDynamicErrorWithStack: null | Error } // Stores dynamic reasons used during an SSR render. export type DynamicValidationState = { hasSuspenseAboveBody: boolean hasDynamicMetadata: boolean hasDynamicViewport: boolean hasAllowedDynamic: boolean dynamicErrors: Array } export function createDynamicTrackingState( isDebugDynamicAccesses: boolean | undefined ): DynamicTrackingState { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null, } } export function createDynamicValidationState(): DynamicValidationState { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [], } } export function getFirstDynamicReason( trackingState: DynamicTrackingState ): undefined | string { return trackingState.dynamicAccesses[0]?.expression } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic( store: WorkStore, workUnitStore: undefined | Exclude, expression: string ): void { if (workUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender-legacy': case 'prerender-ppr': case 'request': break default: workUnitStore satisfies never } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return if (store.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'prerender-ppr': return postponeWithTracking( store.route, expression, workUnitStore.dynamicTracking ) case 'prerender-legacy': workUnitStore.revalidate = 0 // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration( expression: string, store: WorkStore, prerenderStore: PrerenderStoreLegacy ): never { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) prerenderStore.revalidate = 0 store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } function abortOnSynchronousDynamicDataAccess( route: string, expression: string, prerenderStore: PrerenderStoreModern ): void { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` const error = createPrerenderInterruptedError(reason) prerenderStore.controller.abort(error) const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function abortOnSynchronousPlatformIOAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): void { const dynamicTracking = prerenderStore.dynamicTracking abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } export function trackSynchronousPlatformIOAccessInDev( requestStore: RequestStore ): void { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): never { const prerenderSignal = prerenderStore.controller.signal if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } throw createPrerenderInterruptedError( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` ) } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack) } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev /** * This component will call `React.postpone` that throws the postponed error. */ type PostponeProps = { reason: string route: string } export function Postpone({ reason, route }: PostponeProps): never { const prerenderStore = workUnitAsyncStorage.getStore() const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null postponeWithTracking(route, reason, dynamicTracking) } export function postponeWithTracking( route: string, expression: string, dynamicTracking: null | DynamicTrackingState ): never { assertPostpone() if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } React.unstable_postpone(createPostponeReason(route, expression)) } function createPostponeReason(route: string, expression: string) { return ( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error` ) } export function isDynamicPostpone(err: unknown) { if ( typeof err === 'object' && err !== null && typeof (err as any).message === 'string' ) { return isDynamicPostponeReason((err as any).message) } return false } function isDynamicPostponeReason(reason: string) { return ( reason.includes( 'needs to bail out of prerendering at this point because it used' ) && reason.includes( 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error' ) ) } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw new Error( 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js' ) } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED' function createPrerenderInterruptedError(message: string): Error { const error = new Error(message) ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED return error } type DigestError = Error & { digest: string } export function isPrerenderInterruptedError( error: unknown ): error is DigestError { return ( typeof error === 'object' && error !== null && (error as any).digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error ) } export function accessedDynamicData( dynamicAccesses: Array ): boolean { return dynamicAccesses.length > 0 } export function consumeDynamicAccess( serverDynamic: DynamicTrackingState, clientDynamic: DynamicTrackingState ): DynamicTrackingState['dynamicAccesses'] { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses) return serverDynamic.dynamicAccesses } export function formatDynamicAPIAccesses( dynamicAccesses: Array ): string[] { return dynamicAccesses .filter( (access): access is Required => typeof access.stack === 'string' && access.stack.length > 0 ) .map(({ expression, stack }) => { stack = stack .split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4) .filter((line) => { // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false } return true }) .join('\n') return `Dynamic API Usage Debug - ${expression}:\n${stack}` }) } function assertPostpone() { if (!hasPostpone) { throw new Error( `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js` ) } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal(): AbortSignal { const controller = new AbortController() controller.abort(new BailoutToCSRError('Render in Browser')) return controller.signal } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal( workUnitStore: WorkUnitStore ): AbortSignal | undefined { switch (workUnitStore.type) { case 'prerender': case 'prerender-runtime': const controller = new AbortController() if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(() => { controller.abort() }) } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore) if (runtimeStagePromise) { runtimeStagePromise.then(() => scheduleOnNextTick(() => controller.abort()) ) } else { scheduleOnNextTick(() => controller.abort()) } } return controller.signal case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined default: workUnitStore satisfies never } } export function annotateDynamicAccess( expression: string, prerenderStore: PrerenderStoreModern ) { const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function useDynamicRouteParams(expression: string) { const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore && workUnitStore) { switch (workUnitStore.type) { case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use( makeHangingPromise( workUnitStore.renderSignal, workStore.route, expression ) ) } break } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking( workStore.route, expression, workUnitStore.dynamicTracking ) } break } case 'prerender-runtime': throw new InvariantError( `\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'cache': case 'private-cache': throw new InvariantError( `\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'prerender-legacy': case 'request': case 'unstable-cache': break default: workUnitStore satisfies never } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/ // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6' // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp( `\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)` ) const hasMetadataRegex = new RegExp( `\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]` ) const hasViewportRegex = new RegExp( `\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]` ) const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`) export function trackAllowedDynamicAccess( workStore: WorkStore, componentStack: string, dynamicValidation: DynamicValidationState, clientDynamic: DynamicTrackingState ) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true return } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true return } else if ( hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test( componentStack ) ) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true dynamicValidation.hasSuspenseAboveBody = true return } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true return } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push( clientDynamic.syncDynamicErrorWithStack ) return } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense` const error = createErrorWithComponentOrOwnerStack(message, componentStack) dynamicValidation.dynamicErrors.push(error) return } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack( message: string, componentStack: string ) { const ownerStack = process.env.NODE_ENV !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null const error = new Error(message) error.stack = error.name + ': ' + message + (ownerStack ?? componentStack) return error } export enum PreludeState { Full = 0, Empty = 1, Errored = 2, } export function logDisallowedDynamicError( workStore: WorkStore, error: Error ): void { console.error(error) if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error( `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.` ) } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`) } } } export function throwIfDisallowedDynamic( workStore: WorkStore, prelude: PreludeState, dynamicValidation: DynamicValidationState, serverDynamic: DynamicTrackingState ): void { if (prelude !== PreludeState.Full) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError( workStore, serverDynamic.syncDynamicErrorWithStack ) throw new StaticGenBailoutError() } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors if (dynamicErrors.length > 0) { for (let i = 0; i < dynamicErrors.length; i++) { logDisallowedDynamicError(workStore, dynamicErrors[i]) } throw new StaticGenBailoutError() } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error( `Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport` ) throw new StaticGenBailoutError() } if (prelude === PreludeState.Empty) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error( `Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.` ) throw new StaticGenBailoutError() } } else { if ( dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata ) { console.error( `Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata` ) throw new StaticGenBailoutError() } } } export function delayUntilRuntimeStage( prerenderStore: PrerenderStoreModernRuntime, result: Promise ): Promise { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(() => result) } return result } ,import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external' import type { WorkStore } from '../app-render/work-async-storage.external' export function throwWithStaticGenerationBailoutError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwWithStaticGenerationBailoutErrorWithDynamicError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwForSearchParamsAccessInUseCache( workStore: WorkStore, constructorOpt: Function ): never { const error = new Error( `Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, constructorOpt) workStore.invalidDynamicUsageError ??= error throw error } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore() return afterTaskStore?.rootTaskSpawnPhase === 'action' } ]import { workAsyncStorage } from '../app-render/work-async-storage.external' import { throwForMissingRequestStore, workUnitAsyncStorage, } from '../app-render/work-unit-async-storage.external' import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender, } from '../app-render/dynamic-rendering' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { makeHangingPromise, makeDevtoolsIOAwarePromise, } from '../dynamic-rendering-utils' import { isRequestAPICallableInsideAfter } from './utils' /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection(): Promise { const callingExpression = 'connection' const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore) { if ( workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter() ) { throw new Error( `Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after` ) } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined) } if (workStore.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'cache': { const error = new Error( `Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = new Error( `Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'unstable-cache': throw new Error( `Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache` ) case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise( workUnitStore.renderSignal, workStore.route, '`connection()`' ) case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking( workStore.route, 'connection', workUnitStore.dynamicTracking ) case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration( 'connection', workStore, workUnitStore ) case 'request': trackDynamicDataInDynamicRender(workUnitStore) if (process.env.NODE_ENV === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined) } else { return Promise.resolve(undefined) } default: workUnitStore satisfies never } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression) } h// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/ export function describeStringPropertyAccess(target: string, prop: string) { if (isDefinitelyAValidIdentifier.test(prop)) { return `\`${target}.${prop}\`` } return `\`${target}[${JSON.stringify(prop)}]\`` } export function describeHasCheckingStringProperty( target: string, prop: string ) { const stringifiedProp = JSON.stringify(prop) return `\`Reflect.has(${target}, ${stringifiedProp})\`, \`${stringifiedProp} in ${target}\`, or similar` } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule', ]) import { createAsyncLocalStorage } from './async-local-storage'; export const actionAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.map.// Share the instance module in the next-shared layer import { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { actionAsyncStorageInstance as actionAsyncStorage }; //# sourceMappingURL=action-async-storage.external.js.map, // 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'); 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 import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'; import { LRUCache } from '../../server/lib/lru-cache'; export const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } export function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } export function wait(...message) { prefixedLog('wait', ...message); } export function error(...message) { prefixedLog('error', ...message); } export function warn(...message) { prefixedLog('warn', ...message); } export function ready(...message) { prefixedLog('ready', ...message); } export function info(...message) { prefixedLog('info', ...message); } export function event(...message) { prefixedLog('event', ...message); } export function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); export function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map.import { InvariantError } from '../../shared/lib/invariant-error' import { postponeWithTracking, throwToInterruptStaticGeneration, } from '../app-render/dynamic-rendering' import { workAsyncStorage, type WorkStore, } from '../app-render/work-async-storage.external' import { workUnitAsyncStorage, type PrerenderStoreLegacy, type PrerenderStorePPR, type StaticPrerenderStore, } from '../app-render/work-unit-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import type { FallbackRouteParams } from './fallback-params' import type { Params, ParamValue } from './params' import { describeStringPropertyAccess, wellKnownProperties, } from '../../shared/lib/utils/reflect-utils' import { actionAsyncStorage } from '../app-render/action-async-storage.external' import { warnOnce } from '../../build/output/log' interface CacheLifetime {} const CachedParams = new WeakMap>() /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams(): Promise { warnOnce( '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.' ) const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError('Missing workStore in unstable_rootParams') } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.` ) } switch (workUnitStore.type) { case 'cache': case 'unstable-cache': { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams( workUnitStore.rootParams, workStore, workUnitStore ) case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams) default: return workUnitStore satisfies never } } function createPrerenderRootParams( underlyingParams: Params, workStore: WorkStore, prerenderStore: StaticPrerenderStore ): Promise { switch (prerenderStore.type) { case 'prerender-client': { const exportName = '`unstable_rootParams`' throw new InvariantError( `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.` ) } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const promise = makeHangingPromise( prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`' ) CachedParams.set(underlyingParams, promise) return promise } } } break } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams( underlyingParams, fallbackParams, workStore, prerenderStore ) } } } break } case 'prerender-legacy': break default: prerenderStore satisfies never } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams) } function makeErroringRootParams( underlyingParams: Params, fallbackParams: FallbackRouteParams, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy ): Promise { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const augmentedUnderlying = { ...underlyingParams } // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying) CachedParams.set(underlyingParams, promise) Object.keys(underlyingParams).forEach((prop) => { if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get() { const expression = describeStringPropertyAccess( 'unstable_rootParams', prop ) // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } else { // Legacy Prerender throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } }, enumerable: true, }) } else { ;(promise as any)[prop] = underlyingParams[prop] } } }) return promise } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName: string): Promise { const apiName = `\`import('next/root-params').${paramName}()\`` const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError(`Missing workStore in ${apiName}`) } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.` ) } const actionStore = actionAsyncStorage.getStore() if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw new Error( `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.` ) } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw new Error( `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.` ) } } switch (workUnitStore.type) { case 'unstable-cache': case 'cache': { throw new Error( `Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise( paramName, workStore, workUnitStore, apiName ) } case 'private-cache': case 'prerender-runtime': case 'request': { break } default: { workUnitStore satisfies never } } return Promise.resolve(workUnitStore.rootParams[paramName]) } function createPrerenderRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: StaticPrerenderStore, apiName: string ): Promise { switch (prerenderStore.type) { case 'prerender-client': { throw new InvariantError( `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.` ) } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams switch (prerenderStore.type) { case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeHangingPromise( prerenderStore.renderSignal, workStore.route, apiName ) } break } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeErroringRootParamPromise( paramName, workStore, prerenderStore, apiName ) } break } case 'prerender-legacy': { // legacy prerenders can't have fallback params break } default: { prerenderStore satisfies never } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]) } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy, apiName: string ): Promise { const expression = describeStringPropertyAccess(apiName, paramName) // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch (prerenderStore.type) { case 'prerender-ppr': { return postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } case 'prerender-legacy': { return throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } default: { prerenderStore satisfies never } } } M// Alias index file of next/server for edge runtime for tree-shaking purpose export { ImageResponse } from '../spec-extension/image-response'; export { NextRequest } from '../spec-extension/request'; export { NextResponse } from '../spec-extension/response'; export { userAgent, userAgentFromString } from '../spec-extension/user-agent'; export { URLPattern } from '../spec-extension/url-pattern'; export { after } from '../../after'; export { connection } from '../../request/connection'; export { unstable_rootParams } from '../../request/root-params'; //# sourceMappingURL=index.js.mapPexport * from '../server/web/exports/index'; //# sourceMappingURL=server.js.mapLimport { NextResponse } from "next/server"; const WINDOW_MS = 60_000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter(t => now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401, } const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)) export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK' export type HTTPAccessFallbackError = Error & { digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}` } /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError( error: unknown ): error is HTTPAccessFallbackError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const [prefix, httpStatus] = error.digest.split(';') return ( prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)) ) } export function getAccessFallbackHTTPStatus( error: HTTPAccessFallbackError ): number { const httpStatus = error.digest.split(';')[1] return Number(httpStatus) } export function getAccessFallbackErrorTypeByStatus( status: number ): 'not-found' | 'forbidden' | 'unauthorized' | undefined { switch (status) { case 401: return 'unauthorized' case 403: return 'forbidden' case 404: return 'not-found' default: return } } kexport enum RedirectStatusCode { SeeOther = 303, TemporaryRedirect = 307, PermanentRedirect = 308, } import { RedirectStatusCode } from './redirect-status-code' export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT' export enum RedirectType { push = 'push', replace = 'replace', } export type RedirectError = Error & { digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};` } /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error: unknown): error is RedirectError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const digest = error.digest.split(';') const [errorCode, type] = digest const destination = digest.slice(2, -2).join(';') const status = digest.at(-2) const statusCode = Number(status) return ( errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode ) } "import { isHTTPAccessFallbackError, type HTTPAccessFallbackError, } from './http-access-fallback/http-access-fallback' import { isRedirectError, type RedirectError } from './redirect-error' /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError( error: unknown ): error is RedirectError | HTTPAccessFallbackError { return isRedirectError(error) || isHTTPAccessFallbackError(error) } import "next/dist/server/web/globals"; import { adapter } from "next/dist/server/web/adapter"; // Import the userland code. import * as _mod from "private-next-root-dir/src/middleware.js"; import { edgeInstrumentationOnRequestError } from "next/dist/server/web/globals"; import { isNextRouterError } from "next/dist/client/components/is-next-router-error"; const mod = { ..._mod }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (process.env.NODE_ENV !== 'production') { if (isNextRouterError(err)) { err.message = `Next.js navigation API is not allowed to be used in Middleware.`; throw err; } } const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } export default function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map @detectDomainLocaledomainItemshostnamedetectedLocaletoLowerCaseitemdomainHostnamedomainsplitdefaultLocalelocalessomelocaleremoveTrailingSlashroutereplaceparsePathpathhashIndexindexOfqueryIndexhasQuerypathnamesubstringqueryundefined,sliceaddPathPrefixprefixstartsWithaddPathSuffixsuffixpathHasPrefixaddLocaleignorePrefixlowerformatNextPathnameInfoinfobuildIdtrailingSlashbasePathendsWithgetHostnameparsedheadershostArrayisArraytoStringcacheWeakMapnormalizeLocalePathlowercasedLocalesgetsetsegmentssegmentindexlengthremovePathPrefixwithoutPrefixgetNextPathnameInfooptionsi18nnextConfigpathnameNoDataPrefixpathsjoinparseDataresulti18nProvideranalyzeparseRelativeURLurlbasebaseURLURLrelativeisRelativeorigingetRelativeURLRSC_HEADERACTION_HEADERNEXT_ROUTER_STATE_TREE_HEADERNEXT_ROUTER_PREFETCH_HEADERNEXT_ROUTER_SEGMENT_PREFETCH_HEADERNEXT_HMR_REFRESH_HEADERNEXT_HMR_REFRESH_HASH_COOKIENEXT_URLRSC_CONTENT_TYPE_HEADERFLIGHT_HEADERSNEXT_RSC_UNION_QUERYNEXT_ROUTER_STALE_TIME_HEADERNEXT_DID_POSTPONE_HEADERNEXT_REWRITTEN_PATH_HEADERNEXT_REWRITTEN_QUERY_HEADERNEXT_IS_PRERENDER_HEADERNEXT_ACTION_NOT_FOUND_HEADERensureLeadingSlashisGroupSegmentisParallelRouteSegmentaddSearchParamsIfPageSegmentsearchParamsisPageSegmentincludesPAGE_SEGMENT_KEYstringifiedQueryJSONstringifyDEFAULT_SEGMENT_KEYnormalizeAppPathreducenormalizeRscURLisThenablepromisethenInvariantErrorErrorconstructormessagenametagsManifestMapisStaletagstimestamptagrevalidatedAtLRUCachememoryCacheentrypendingSetsdebugprocessenvNEXT_PRIVATE_DEBUG_CACHEconsolebindDefaultCacheHandlercacheKeypendingPromiseprivateEntryperformancetimeOriginnowrevalidatereturnStreamnewSavedvalueteeexpirependingEntryresolvePendingPromiseresolveclonedValuereadergetReaderchunkreaddoneBufferfrombyteLengthisErrorederrorRetryCounterrdeleterefreshTagsgetExpirationexpirationMathmaxexpireTagsroundDYNAMIC_ERROR_CODEDynamicServerErrordescriptiondigestisDynamicServerErrorNEXT_STATIC_GEN_BAILOUTStaticGenBailoutErrorcodeisStaticGenBailoutErrorerrorBAILOUT_TO_CSRBailoutToCSRErrorreasonisBailoutToCSRErrorReactgetRuntimeStagePromiseworkUnitAsyncStorageworkAsyncStoragemakeHangingPromiseMETADATA_BOUNDARY_NAMEVIEWPORT_BOUNDARY_NAMEOUTLET_BOUNDARY_NAMEROOT_LAYOUT_BOUNDARY_NAMEscheduleOnNextTickhasPostponeunstable_postponecreateDynamicTrackingStateisDebugDynamicAccessesdynamicAccessessyncDynamicErrorWithStackcreateDynamicValidationStatehasSuspenseAboveBodyhasDynamicMetadatahasDynamicViewporthasAllowedDynamicdynamicErrorsgetFirstDynamicReasontrackingStateexpressionmarkCurrentScopeAsDynamicstoreworkUnitStoretypeforceDynamicforceStaticdynamicShouldErrorpostponeWithTrackingdynamicTrackingdynamicUsageDescriptiondynamicUsageStackstackNODE_ENVusedDynamicthrowToInterruptStaticGenerationprerenderStoretrackDynamicDataInDynamicRenderabortOnSynchronousDynamicDataAccesscreatePrerenderInterruptedErrorcontrollerabortpushabortOnSynchronousPlatformIOAccesserrorWithStacktrackSynchronousPlatformIOAccessInDevrequestStoreprerenderPhaseabortAndThrowOnSynchronousRequestDataAccessprerenderSignalsignalabortedwarnOnSyncDynamicErrortrackSynchronousRequestDataAccessInDevPostponegetStoreassertPostponecreatePostponeReasonisDynamicPostponeisDynamicPostponeReasonNEXT_PRERENDER_INTERRUPTEDisPrerenderInterruptedErroraccessedDynamicDataconsumeDynamicAccessserverDynamicclientDynamicformatDynamicAPIAccessesfilteraccesslinecreateRenderInBrowserAbortSignalAbortControllercreateHangingInputAbortSignalcacheSignalinputReadyruntimeStagePromiseannotateDynamicAccessuseDynamicRouteParamsworkStorefallbackParamsfallbackRouteParamsuserenderSignalhasSuspenseRegexbodyAndImplicitTagshasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegexRegExphasMetadataRegexhasViewportRegexhasOutletRegextrackAllowedDynamicAccesscomponentStackdynamicValidationtestcreateErrorWithComponentOrOwnerStackownerStackcaptureOwnerStackPreludeStatelogDisallowedDynamicErrordevhasReadableErrorStacksthrowIfDisallowedDynamicpreludeidelayUntilRuntimeStageafterTaskAsyncStoragethrowWithStaticGenerationBailoutErrorthrowWithStaticGenerationBailoutErrorWithDynamicErrorthrowForSearchParamsAccessInUseCacheconstructorOptcaptureStackTraceinvalidDynamicUsageErrorisRequestAPICallableInsideAfterafterTaskStorerootTaskSpawnPhasethrowForMissingRequestStoremakeDevtoolsIOAwarePromiseconnectioncallingExpressionphaseisDefinitelyAValidIdentifierdescribeStringPropertyAccesstargetpropdescribeHasCheckingStringPropertystringifiedPropwellKnownPropertiesSetactionAsyncStoragewarnOnceCachedParamsunstable_rootParamscreatePrerenderRootParamsrootParamsunderlyingParamsexportNamekeyhascachedParamsmakeErroringRootParamsaugmentedUnderlyingObjectkeysforEachdefinePropertyenumerablegetRootParamparamNameapiNameactionStoreisAppRouteisActioncreatePrerenderRootParamPromisemakeErroringRootParamPromiseNextResponseWINDOW_MSMAX_PER_WINDOWhitsgetClientIprequesttrimcheckRateLimitLocalwindowMsDatetimestampstallowedremainingresetceilmiddlewarenextUrlnextipuseRedisREDIS_URLCOSMIC_REDIS_ENABLEDstatusStringresponseconfigmatcherHTTPAccessErrorStatusNOT_FOUNDFORBIDDENUNAUTHORIZEDALLOWED_CODESvaluesHTTP_ERROR_FALLBACK_ERROR_CODEisHTTPAccessFallbackErrorhttpStatusNumbergetAccessFallbackHTTPStatusgetAccessFallbackErrorTypeByStatusRedirectStatusCodeREDIRECT_ERROR_CODERedirectTypeisRedirectErrorerrorCodedestinationatstatusCodeisNaNisNextRouterError@1ConcatSourceRawSource// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js  ReplaceSourceReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware06undefined924930undefined15491555undefined32863320falseundefined33233345{}undefined34343439__webpack_require__.gundefined35433548__webpack_require__.gundefined35713576__webpack_require__.gundefined RawSource6 ;// ./node_modules/next/dist/esm/server/web/error.js |webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware06undefined352358undefined582588undefined3 ;// ./node_modules/next/dist/esm/lib/constants.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middleware06undefined6066undefined128134undefined203209undefined250256undefined305311undefined358364undefined427433undefined524530undefined576582undefined628634undefined678684undefined712718undefined752758undefined793799undefined834840undefined875881undefined934940undefined10111017undefined10961102undefined12211227undefined12661272undefined13121318undefined13641370undefined14291435undefined17081714undefined17891795undefined18381844undefined18801879(/* unused pure expression or super */ null && (undefined19131912))undefined19631969undefined21682174undefined22212227undefined22712277undefined23262332undefined23792385undefined24852491undefined25622568undefined26372643undefined27102716undefined27992805undefined28802886undefined29692975undefined30153014(/* unused pure expression or super */ null && (undefined31903189))undefined31923198undefined32383237(/* unused pure expression or super */ null && (undefined33393338))undefined33413347undefined33933392(/* unused pure expression or super */ null && (undefined34823481))undefined34843490undefined35253524(/* unused pure expression or super */ null && (undefined36453644))undefined36473653undefined37053704(/* unused pure expression or super */ null && (undefined38103809))undefined38123818undefined38533852(/* unused pure expression or super */ null && (undefined39743973))undefined39763982undefined41074113undefined42434249undefined42914290(/* unused pure expression or super */ null && (undefined43964395))undefined43984404undefined44414440(/* unused pure expression or super */ null && (undefined45954594))undefined45974603undefined46344633(/* unused pure expression or super */ null && (undefined48454844))undefined48474853undefined48884887(/* unused pure expression or super */ null && (undefined50425041))undefined50445050undefined50795078(/* unused pure expression or super */ null && (undefined51455144))undefined51475153undefined83288379undefined6 ;// ./node_modules/next/dist/esm/server/web/utils.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware094undefined447453undefined16891695undefined39423948undefined47104716undefined52955301undefined53735395__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__._undefined54065436__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._undefineda52435352NEXT_QUERY_PARAM_PREFIXundefined53635488NEXT_INTERCEPTION_MARKER_PREFIXundefinedRawSourceK ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware045undefined14491455undefined16321638undefined21252142__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined25292546__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefinedO20652164PageSignatureErrorundefined25512650PageSignatureErrorundefinedRawSourceJ ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js ReplaceSourceSourceMapSourceexport function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,AAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAAA,AAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0],"file":"x"}false06undefinedS ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js L/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map \{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0],"file":"x"}false191197undefinedH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js I/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0],"file":"x"}false207213undefinedM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js import { parsePath } from './parse-path'; /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;CAGC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined164170undefined319327__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!271357parsePathundefinedRawSourceM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js import { parsePath } from './parse-path'; /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;CAIC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined222228undefined377385__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!329415parsePathundefinedRawSourceM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js Simport { parsePath } from './parse-path'; /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,UAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0],"file":"x"}false040undefined328334undefined463471__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!415501parsePathundefinedRawSourceH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js import { addPathPrefix } from './add-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AAEjD;;;;CAIC,GACD,OAAO,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,cAAcM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,cAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,cAAcG,MAAO,MAAGC;AACjC","ignoreList":[0],"file":"x"}zfalse049undefined51100undefined337343undefined767779__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined822834__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined944956__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined_660755pathHasPrefixundefined798893pathHasPrefixundefined10031097addPathPrefixundefinedRawSourceW ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js import { removeTrailingSlash } from './remove-trailing-slash'; import { addPathPrefix } from './add-path-prefix'; import { addPathSuffix } from './add-path-suffix'; import { addLocale } from './add-locale'; export function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map /{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;AAOxC,OAAO,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,UACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,oBAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,cACTD,cAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,cAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,cAAcI,UAAU,OACxBA,WACFN,oBAAoBM;AAC1B","ignoreList":[0],"file":"x"}_false061undefined63112undefined114163undefined165205undefined207213undefined273281__WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__._undefined444462__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined524536__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined538550__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined664676__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined779791__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined821839__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined63150addLocaleundefined313419removeTrailingSlashundefined481575addPathSuffixundefined577671addPathPrefixundefined785879addPathPrefixundefined9821076addPathSuffixundefined11061212removeTrailingSlashundefinedRawSource= ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,AAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0],"file":"x"}false274280undefinedK ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map  {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":"AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0],"file":"x"}false540546undefinedP ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js 6import { pathHasPrefix } from './path-has-prefix'; /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AAEjD;;;;;;;CAOC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,cAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACb","ignoreList":[0],"file":"x"}false049undefined360366undefined796808__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined%739834pathHasPrefixundefinedRawSourceT ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js nimport { normalizeLocalePath } from '../../i18n/normalize-locale-path'; import { removePathPrefix } from './remove-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; export function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map _{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aAAa,QAAQ,oBAAmB;AAkDjD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAAgB;QAE0BA;IAA1C,MAAM,EAAEC,QAAQ,E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AAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,wBAC7BZ,oBAAoBY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0],"file":"x"}false070undefined72127undefined129178undefined180186undefined536548__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined602617__WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__._undefined15261544__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined19071925__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined352447pathHasPrefixundefined501602removePathPrefixundefined15111618normalizeLocalePathundefined19812088normalizeLocalePathundefinedRawSource9 ;// ./node_modules/next/dist/esm/server/web/next-url.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware079undefined81177undefined179238undefined240330undefined683689undefined14441462__WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined15781623undefinedundefined17251735__WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__._undefined19331950__WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__._undefined29853006__WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined11091216getNextPathnameInfoundefined14421533getHostnameundefined17311835detectDomainLocaleundefined28702983formatNextPathnameInfoundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js qwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware0107undefinedG ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware037undefined39104undefined106165undefined167209undefined211217undefined520526undefined699709__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined9661000falseundefined10031120{}undefined12391245__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined12751299__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined14211434__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined14891534 falseundefined153815400undefined26402655__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__._undefined28672880__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._undefined478568validateURLundefined9521030NextURLundefined10601178toNodeOutgoingHttpHeadersundefined13001392_edge_runtime_cookies.RequestCookiesundefined25562651RemovedPageErrorundefined28632954RemovedUAErrorundefinedRawSourceP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js xwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware06undefinedH ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js 8webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware066undefined68105undefined107172undefined174225undefined227270undefined14041410undefined15761590__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined20832097__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined22072221__WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__._undefined25152528__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined26982704__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined27432767__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined41864196__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined44864496__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined1119response_INTERNALSundefined13021396_edge_runtime_cookies.ResponseCookiesundefined18891983_edge_runtime_cookies.ResponseCookiesundefined20932192(0,_edge_runtime_cookies.stringifyCookie)undefined24862570ReflectAdapterundefined26582666response_INTERNALSundefined27402818NextURLundefined28572975toNodeOutgoingHttpHeadersundefined36003608response_INTERNALSundefined43944484validateURLundefined47744864validateURLundefinedRawSourceL ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js S/** * The result of parsing a URL relative to a base URL. */ export function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map D{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD,OAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0],"file":"x"}!false6369undefined687693undefinedJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js export const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map  {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC","ignoreList":[0],"file":"x"} false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefinedG787814app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEundefinedRawSource; ;// ./node_modules/next/dist/esm/server/internal-utils.js rwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middleware078undefined115134__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined139145undefined267273undefined453472__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefinedN36140NEXT_RSC_UNION_QUERYundefined445549NEXT_RSC_UNION_QUERYundefinedRawSourceO ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js 2/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ={"version":3,"sources":["webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3C","ignoreList":[0],"file":"x"}false159165undefined8 ;// ./node_modules/next/dist/esm/shared/lib/segment.js export function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } export function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } export function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } export const PAGE_SEGMENT_KEY = '__PAGE__'; export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":"AAEA,OAAO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEA,OAAO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEA,OAAO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMQ,mBAAmB,WAAU;AAC1C,OAAO,MAAMI,sBAAsB,cAAa","ignoreList":[0],"file":"x"}Lfalse06undefined143149undefined258264undefined611617undefined655661undefinedG ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'; import { isGroupSegment } from '../../segment'; /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map  {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","normalizeRscURL","url","replace"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,iBAAiBC,KAAa;IAC5C,OAAOH,mBACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,eAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAA,CAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACD,OAAO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0],"file":"x"}+false073undefined75121undefined747753undefined800817__WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__._undefined10281041__WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._undefined16091615undefinedH672777ensureLeadingSlashundefined9881085isGroupSegmentundefinedRawSourceP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js )webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middleware042undefined6571undefined331337undefined955968__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined16061619__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined17941807__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined23302343__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined24942507__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined31143127__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined32643277__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined39013914__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined44684481__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined898982ReflectAdapterundefined16201704ReflectAdapterundefined18791963ReflectAdapterundefined24862570ReflectAdapterundefined27212805ReflectAdapterundefined34123496ReflectAdapterundefined36333717ReflectAdapterundefined43414425ReflectAdapterundefined49795063ReflectAdapterundefinedRawSourceK ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|shared876882undefined10591065undefined12391245undefinedC885907async_local_storage_createAsyncLocalStorageundefinedRawSourceS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js  webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared063undefined6571undefined105127__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB34149async_local_storage_createAsyncLocalStorageundefinedRawSourceS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js >webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared54177undefined179234undefinedX ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware043undefined4589undefined91133undefined135217undefined240246undefined566572undefined969982__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined11371143undefined13691375undefined21182124undefined22422256__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined25832598__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined30263040__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined47344747__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined48614867undefined56735686__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined57785784undefined63646370undefinedm350370request_cookies_RequestCookiesAdapterundefined740824ReflectAdapterundefined20632157_edge_runtime_cookies.ResponseCookiesundefined24842572workAsyncStorageInstanceundefined30003094_edge_runtime_cookies.ResponseCookiesundefined47884872ReflectAdapterundefined57915875ReflectAdapterundefined65556585request_cookies_responseCookiesToRequestCookiesundefinedRawSource@ ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middleware63946400undefined70877093undefined72607473undefinedO54795486constants_NodeSpanundefined55965603constants_NodeSpanundefinedRawSource< ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js O/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0],"file":"x"}false136142undefined= ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js ~webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware072undefined74134undefined674708trueundefined723729__webpack_require__undefined731750817undefined761908{}undefined9951001undefined11391145undefined36493672__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined48114826__WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__._undefined62146223__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined73247347__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined93189364undefined33193423NextVanillaSpanAllowlistundefined45624650LogSpanAllowListundefined60386127isThenableundefined72287332NextVanillaSpanAllowlistundefined92149222tracer_getTracerundefinedRawSource< ;// ./node_modules/next/dist/esm/server/api-utils/index.js {|webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middleware071undefined73182undefined184231undefined233282undefined284290undefined703709undefined930936undefined16151621undefined16981711__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined17701796__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__._undefined19271968__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._undefined20562062undefined21222128undefined21872193undefined22252224(/* unused pure expression or super */ null && (undefined22402239))undefined22422248undefined23132319undefined23892395undefined25362542__webpack_require__undefined25442570663undefined31363173 trueundefined318631900undefined32133232"production"undefined37533790 trueundefined380338070undefined38303849"production"undefined41794185undefined44554461undefined47754781undefined13901474HeadersAdapterundefined15331650PRERENDER_REVALIDATE_HEADERundefined17811928PRERENDER_REVALIDATE_ONLY_GENERATED_HEADERundefinedRawSourceN ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js xyVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware086undefined8894undefined406430__WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__._undefined529556__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined860896 falseundefined9019470undefined15331560__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined16531690 trueundefined170317070undefined17301749"production"undefined21212148__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined22242261 trueundefined227422780undefined23012320"production"undefined312431checkIsOnDemandRevalidateundefined530650COOKIE_NAME_PRERENDER_BYPASSundefined15501670COOKIE_NAME_PRERENDER_BYPASSundefined21862306COOKIE_NAME_PRERENDER_BYPASSundefinedRawSourceH ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js uvwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middleware075undefined77148undefined150336undefined338417undefined419476undefined478527undefined580593__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined635648__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined701714__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined812825__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined827840__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined869896__WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined14781495__WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__._undefined16191633__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined18351841undefined22822288undefined39273940__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined39423955__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined42024222__WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined49084942__WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__._undefined52005216__WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._undefined55545560undefined57141HeadersAdapterundefined183275FLIGHT_HEADERSundefined328412HeadersAdapterundefined510602_edge_runtime_cookies.RequestCookiesundefined604688HeadersAdapterundefined717829MutableRequestCookiesAdapterundefined14111515splitCookiesStringundefined16391733_edge_runtime_cookies.ResponseCookiesundefined40134105_edge_runtime_cookies.RequestCookiesundefined41074191HeadersAdapterundefined44384536request_cookies_RequestCookiesAdapterundefined52225361createCookiesWithMutableAccessCheckundefined56195717DraftModeProviderundefinedRawSourceX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js rswebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|shared063undefined6571undefined109131__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB38153async_local_storage_createAsyncLocalStorageundefinedRawSourceJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js o~ false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefined615app_router_headers_RSC_HEADERundefined3244app_router_headers_ACTION_HEADERundefined285313app_router_headers_NEXT_ROUTER_STATE_TREE_HEADERundefined349375app_router_headers_NEXT_ROUTER_PREFETCH_HEADERundefined659693app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERundefined735757app_router_headers_NEXT_HMR_REFRESH_HEADERundefined787814components_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEundefined853860app_router_headers_NEXT_URLundefined882904app_router_headers_RSC_CONTENT_TYPE_HEADERundefined934947app_router_headers_FLIGHT_HEADERSundefined957966app_router_headers_RSC_HEADERundefined9731001app_router_headers_NEXT_ROUTER_STATE_TREE_HEADERundefined10081034app_router_headers_NEXT_ROUTER_PREFETCH_HEADERundefined10411063app_router_headers_NEXT_HMR_REFRESH_HEADERundefined10701104app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERundefined11151134app_router_headers_NEXT_RSC_UNION_QUERYundefined11521180app_router_headers_NEXT_ROUTER_STALE_TIME_HEADERundefined12131236app_router_headers_NEXT_DID_POSTPONE_HEADERundefined12681293app_router_headers_NEXT_REWRITTEN_PATH_HEADERundefined13301356app_router_headers_NEXT_REWRITTEN_QUERY_HEADERundefined13941417app_router_headers_NEXT_IS_PRERENDER_HEADERundefined14491476app_router_headers_NEXT_ACTION_NOT_FOUND_HEADERundefinedRawSource@ ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js l{#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}|3619invariant_error_InvariantErrorundefinedRawSourceX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js hiwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared54186undefined188277undefined279344undefined346409undefined411417undefined768774undefined10301036undefined17091715undefined27202726undefined35213527undefined41094115undefined47914797undefined54005406undefined58735879undefined6793work_unit_async_storage_external_throwForMissingRequestStoreundefined54665487work_unit_async_storage_external_getRuntimeStagePromiseundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js etw7619lib_invariant_error_InvariantErrorundefinedRawSource: ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js cdhwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware12541260undefinedeY ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js ap// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map(); export const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;AACrB,OAAO,MAAMA,eAAe,IAAIC,MAAqB;AAErD,OAAO,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0],"file":"x"}#false102108undefined141147undefinedaP ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js ][K/* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; k/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache'; import { isStale, tagsManifest } from '../incremental-cache/tags-manifest.external'; // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; export default DefaultCacheHandler; //# sourceMappingURL=default.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,SACtB,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BE;AAEJ,MAAMC,sBAAsC;IAC1C,MAAMC,KAAIC,QAAQ;QAChB,MAAMC,iBAAiBZ,YAAYU,GAAG,CAACC;QAEvC,IAAIC,gBAAgB;YAClBV,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,MAAMC;QACR;QAEA,MAAMC,eAAehB,YAAYa,GAAG,CAACC;QAErC,IAAI,CAACE,cAAc;YACjBX,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,OAAOH;QACT;QAEA,MAAMV,QAAQe,aAAaf,KAAK;QAChC,IACEgB,YAAYC,UAAU,GAAGD,YAAYE,GAAG,KACxClB,MAAMmB,SAAS,GAAGnB,MAAMoB,UAAU,GAAG,MACrC;YACA,qEAAqE;YACrE,yEAAyE;YACzE,kBAAkB;YAClBhB,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YAEzB,OAAOH;QACT;QAEA,IAAIb,QAAQG,MAAMqB,IAAI,EAAErB,MAAMmB,SAAS,GAAG;YACxCf,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YAEzB,OAAOH;QACT;QACA,MAAM,CAACY,cA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F;IAEA,MAAMgC;IACJ,gDAAgD;IAClD;IAEA,MAAMC,eAAc,GAAGzB,IAAI;QACzB,MAAM0B,aAAaC,KAAKC,GAAG,IACtB5B,KAAK6B,GAAG,CAAC,CAACC,MAAQrD,aAAac,GAAG,CAACuC,QAAQ;QAGhD/C,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,aAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,eAAeR,oBAAmB","ignoreList":[0],"file":"x"}false448487undefined489572undefined652659__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined17771783__WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._undefined29542959Bufferundefined37063717__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined41954206__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined42484262/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined42484262undefined42634262(/* unused pure expression or super */ null && (undefined42824281))undefined42824282.5);undefined603683LRUCacheundefined880898default_external_DefaultCacheHandlerundefined18011884isStaleundefined38073887tagsManifestundefined43654445tagsManifestundefined45224547default_externalundefined46004618default_external_DefaultCacheHandlerundefinedRawSource? ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js WXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware072undefined797803undefined28532859undefined34163422undefined38063812undefined41174123undefinedK711handlers_debugundefined888892handlers_debugundefined913917handlers_debugundefined990994handlers_debugundefined10151019handlers_debugundefined12841288handlers_debugundefined13091313handlers_debugundefined14551459handlers_debugundefined14801484handlers_debugundefined17171721handlers_debugundefined17421746handlers_debugundefined19191923handlers_debugundefined19441948handlers_debugundefined20952099handlers_debugundefined21202124handlers_debugundefined22572261handlers_debugundefined22822286handlers_debugundefined44194423handlers_debugundefined44444448handlers_debugundefinedRawSource? ;// ./node_modules/next/dist/esm/server/revalidation-utils.js TUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware055undefined142148undefined20362051__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._undefined22242230undefined*19732074getCacheHandlersundefinedRawSourceRSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middleware876882undefined10591065undefined12391245undefined645async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined258278async_local_storage_FakeAsyncLocalStorageundefined312351async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined520559async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined595634async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined675714async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined778805async_local_storage_maybeGlobalAsyncLocalStorageundefined885907app_render_async_local_storage_createAsyncLocalStorageundefined921948async_local_storage_maybeGlobalAsyncLocalStorageundefined972999async_local_storage_maybeGlobalAsyncLocalStorageundefined10251045async_local_storage_FakeAsyncLocalStorageundefined10611072async_local_storage_bindSnapshotundefined10881115async_local_storage_maybeGlobalAsyncLocalStorageundefined11351162async_local_storage_maybeGlobalAsyncLocalStorageundefined11911211async_local_storage_FakeAsyncLocalStorageundefined12341247async_local_storage_createSnapshotundefined12611288async_local_storage_maybeGlobalAsyncLocalStorageundefined13081335async_local_storage_maybeGlobalAsyncLocalStorageundefinedRawSourceY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js OPwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middleware063undefined6571undefined110132__WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedM39154app_render_async_local_storage_createAsyncLocalStorageundefinedRawSourceY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js LMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware54213undefined215247undefinedN@ ;// ./node_modules/next/dist/esm/server/after/after-context.js JK9webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middleware053undefined55120undefined122179undefined181257undefined259321undefined323387undefined389474undefined476563undefined565571undefined829840__WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__._undefined917926__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined17631782__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined19181938__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined30943105__WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__._undefined31593179__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined37823797__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined38813894__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined41124133__WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._undefined49754988__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined265343(p_queue_default())undefined420509isThenableundefined13461442workUnitAsyncStorageInstanceundefined15781676afterTaskAsyncStorageInstanceundefined28322925async_local_storage_bindSnapshotundefined29793077afterTaskAsyncStorageInstanceundefined36803768workAsyncStorageInstanceundefined38523944lib_invariant_error_InvariantErrorundefined41624275withExecuteRevalidatesundefined51175209lib_invariant_error_InvariantErrorundefinedRawSource< ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js GHwwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware181187undefined807813undefinedIE ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js EFwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middleware053undefined55129undefined131184undefined186248undefined250316undefined318324undefined18131828__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__._undefined29532966__WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__._undefined32733284__WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__._undefined36213642__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined38293844__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined14931594normalizeAppPathundefined27192816async_local_storage_createSnapshotundefined31233211AfterContextundefined35483661getCacheHandlerEntriesundefined38483949createLazyResultundefinedRawSource= ;// ./node_modules/next/dist/esm/server/web/web-on-close.js BCwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware136142undefined616622undefined11741180undefinedDG ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js @Aswebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middleware235241undefinedBJ ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js >?webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware075undefined7783undefined585591undefined@> ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js <=webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware064undefined66128undefined130178undefined12761297__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined14861501__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined16191625undefined19401965__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined22262251__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined10991212getCacheHandlerEntriesundefined14011502createLazyResultundefined19342049NEXT_CACHE_IMPLICIT_TAG_IDundefined23102425NEXT_CACHE_IMPLICIT_TAG_IDundefinedRawSource? ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js 9:kwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware163169undefined;8 ;// ./node_modules/next/dist/esm/server/web/adapter.js 78webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware044undefined46124undefined126217undefined219273undefined275331undefined333428undefined430466undefined468529undefined531604undefined606772undefined774833undefined835908undefined910995undefined9971058undefined10601136undefined11381226undefined12281275undefined12771332undefined13341382undefined13841446undefined14481523undefined15251579undefined15811639undefined16411647undefined16781688__WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__._undefined18641881__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined21212138__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined23762393__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined27592767__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined32473253__webpack_require__undefined32553299720undefined34113417undefined35293559__WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__._undefined37153729__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__._undefined38323838__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined43344356__WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__._undefined49004926__WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined50455062__WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__._undefined50835092__WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__._undefined53515364__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined56085653 falseundefined565756830undefined57495768__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined59165940__WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._undefined69396958"production"undefined70127052""undefined70727091"production"undefined74027420__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined76857708__WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__._undefined77927805__WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__._undefined86048618__WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__._undefined86428650__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined86608673__WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__._undefined93209338__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined95169530__WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__._undefined96189641__WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__._undefined97539767__WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__._undefined1092310949__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__._undefined1112011135__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined1115611175__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined1268612692__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1285512901 trueundefined1341613431__WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._undefined1370613759 falseundefined13764138050undefined1423214257__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__._undefined1439414420__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._undefined1538415403__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1544915468__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1594815954__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1631716363trueundefined1693716950__WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__._undefined1706517076__WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined1778417811__WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._undefined`53139NextRequestundefined315414PageSignatureErrorundefined654753PageSignatureErrorundefined9911090PageSignatureErrorundefined14561543tracer_getTracerundefined22682398ensureInstrumentationRegisteredundefined25542653normalizeRscURLundefined27562834NextURLundefined33303444normalizeNextQueryParamundefined39884110fromNodeOutgoingHttpHeadersundefined42294334isRSCRequestHeaderundefined43554439RSC_HEADERundefined46984790FLIGHT_HEADERSundefined51095213NEXT_RSC_UNION_QUERYundefined53615480stripInternalSearchParamsundefined68876994getEdgePreviewPropsundefined72597376getBuiltinRequestContextundefined74607551NextFetchEventundefined83508444CloseControllerundefined84688555tracer_getTracerundefined85658644MiddlewareSpanundefined92919398getEdgePreviewPropsundefined95769675getImplicitTagsundefined97639880createRequestStoreForAPIundefined999210091createWorkStoreundefined1124711365NEXT_ROUTER_PREFETCH_HEADERundefined1153611624workAsyncStorageInstanceundefined1164511741workUnitAsyncStorageInstanceundefined1325213330NextURLundefined1401214113parseRelativeURLundefined1482514941NEXT_REWRITTEN_PATH_HEADERundefined1507815196NEXT_REWRITTEN_QUERY_HEADERundefined1616016264NEXT_RSC_UNION_QUERYundefined1631016414NEXT_RSC_UNION_QUERYundefined1689416972NextURLundefined1791218009getRelativeURLundefined1812418204NextResponseundefined1891219036getWaitUntilPromiseFromEventundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js 45webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware053undefined5561undefined474480undefined626632undefined6K ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js 23wwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middleware145186undefined48 ;// ./node_modules/next/dist/esm/server/after/after.js 01pwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware076undefined187193undefined28 ;// ./node_modules/next/dist/esm/server/after/index.js ./awebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware023undefined0 // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js ,;const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; export class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } export function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map {"version":3,"sources":["webpack://../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}!false5157undefined258264undefined=5774hooks_server_context_DynamicServerErrorundefinedRawSourceQ ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js '6const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; export class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } export function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map {"version":3,"sources":["webpack://../../../src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":"AAAA,MAAMA,0BAA0B;AAEhC,OAAO,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEA,OAAO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0],"file":"x"}!false5965undefined205211undefinedE6585static_generation_bailout_StaticGenBailoutErrorundefinedRawSourceD ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js "#|webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware06undefined11021108undefined25102516undefinedD11041121dynamic_rendering_utils_makeHangingPromiseundefinedRawSourceF ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js  zwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middleware06undefined6874undefined136142undefined200206undefined!L ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js ,// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}#false260266undefined566572undefined8266282bailout_to_csr_BailoutToCSRErrorundefinedRawSourceI ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js 'xx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react'; import { DynamicServerError } from '../../client/components/hooks-server-context'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { getRuntimeStagePromise, workUnitAsyncStorage } from './work-unit-async-storage.external'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants'; import { scheduleOnNextTick } from '../../lib/scheduler'; import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'; import { InvariantError } from '../../shared/lib/invariant-error'; const hasPostpone = typeof React.unstable_postpone === 'function'; export function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } export function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } export function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } export function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; export function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } export function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } export function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } export function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } export function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } export function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } export function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } export function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); export function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = "production" !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } export var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); export function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } export function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } export function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map {"version":3,"sources":["webpack://../../../src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AACxF,OAAOA,WAAW,QAAO;AAEzB,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,sBAAsB,EACtBC,oBAAoB,QACf,qCAAoC;AAC3C,SAASC,gBAAgB,QAAQ,4CAA2C;AAC5E,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,QACpB,yCAAwC;AAC/C,SAASC,kBAAkB,QAAQ,sBAAqB;AACxD,SAASC,iBAAiB,QAAQ,+CAA8C;AAChF,SAASC,cAAc,QAAQ,mCAAkC;AAEjE,MAAMC,cAAc,OAAOd,MAAMe,iBAAiB,KAAK;AAwCvD,OAAO,SAASC,2BACdC,sBAA2C;IAE3C,OAAO;QACLA;QACAC,iBAAiB,EAAE;QACnBC,2BAA2B;IAC7B;AACF;AAEA,OAAO,SAASC;IACd,OAAO;QACLC,sBAAsB;QACtBC,oBAAoB;QACpBC,oB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ACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"file":"x"}false15771602undefined16041685undefined16871776undefined17781875undefined18771953undefined19552018undefined20202172undefined21742230undefined22322312undefined23142379undefined24082412__WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._undefined24482454undefined26402646undefined28782884undefined34183424undefined60116039falseundefined60426114{}undefined64066412undefined73497355undefined81368164falseundefined81678231{}undefined89888994undefined97459751undefined1038310389undefined1216512171undefined1253412540undefined1258812587(/* unused pure expression or super */ null && (undefined1262512624))undefined1262712633undefined1292012926undefined1374213748undefined1484414850undefined1506915075undefined1516515171undefined1551815524undefined1712317129undefined1769017696undefined1983919845undefined2017520181undefined2356723591__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2366023681__WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2374423765__WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2382623845__WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2385923865undefined2606826123 falseundefined26127261510undefined2642926435undefined2669326699undefined2746427470undefined3058830594undefined816141679react_react_serverundefined43694388dynamic_rendering_postponeWithTrackingundefined55595590dynamic_rendering_throwToInterruptStaticGenerationundefined64956525dynamic_rendering_trackDynamicDataInDynamicRenderundefined1191511934dynamic_rendering_postponeWithTrackingundefined1198011999dynamic_rendering_postponeWithTrackingundefined2029720316dynamic_rendering_postponeWithTrackingundefined2254822662ROOT_LAYOUT_BOUNDARY_NAMEundefined2273122839METADATA_BOUNDARY_NAMEundefined2290223010VIEWPORT_BOUNDARY_NAMEundefined2307123175OUTLET_BOUNDARY_NAMEundefinedRawSource: ;// ./node_modules/next/dist/esm/server/request/utils.js "Limport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } export function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map b {"version":3,"sources":["webpack://../../../src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;AAGvF,OAAO,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEA,OAAO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,AAAkB,MAAK;AAChD","ignoreList":[0],"file":"x"}_false089undefined91178undefined180186undefined626632undefined11151121undefined18801886undefined?16901720utils_isRequestAPICallableInsideAfterundefinedRawSource? ;// ./node_modules/next/dist/esm/server/request/connection.js Mimport { workAsyncStorage } from '../app-render/work-async-storage.external'; import { throwForMissingRequestStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender } from '../app-render/dynamic-rendering'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { makeHangingPromise, makeDevtoolsIOAwarePromise } from '../dynamic-rendering-utils'; import { isRequestAPICallableInsideAfter } from './utils'; /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if ("production" === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ^!{"version":3,"sources":["webpack://../../../src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynamicTracking","process","env","NODE_ENV"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,4CAA2C;AAC5E,SACEC,2BAA2B,EAC3BC,oBAAoB,QACf,iDAAgD;AACvD,SACEC,oBAAoB,EACpBC,gCAAgC,EAChCC,+BAA+B,QAC1B,kCAAiC;AACxC,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,kBAAkB,EAClBC,0BAA0B,QACrB,6BAA4B;AACnC,SAASC,+BAA+B,QAAQ,UAAS;AAEzD;;;;CAIC,GACD,OAAO,SAASC;IACd,MAAMC,oBAAoB;IAC1B,MAAMC,YAAYZ,iBAAiBa,QAAQ;IAC3C,MAAMC,gBAAgBZ,qBAAqBW,QAAQ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+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,OAAOV,mBACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,OAAOd,qBACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,OAAOxB,iCACL,cACAQ,WACAE;gBAEJ,KAAK;oBACHT,gCAAgCS;oBAChC,IAAIe,AA1Fc,QA0FNC,GAAG,CAACC,KAAa,GAAL,YAAoB;wBAC1C,wEAAwE;wBACxE,8EAA8E;wBAC9E,4EAA4E;wBAC5E,OAAOvB,2BAA2Ba;oBACpC,OAAO;wBACL,OAAOF,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9B","ignoreList":[0],"file":"x"}false076undefined78192undefined194331undefined333422undefined424515undefined517574undefined777783undefined62136242falseundefined62456638{}undefinedD ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js  // This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; export function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } export function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map R {"version":3,"sources":["webpack://../../../../src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAErC,OAAO,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEA,OAAO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEA,OAAO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0],"file":"x"}2false466472undefined695701undefined939945undefinedr475502reflect_utils_describeStringPropertyAccessundefined931949reflect_utils_wellKnownPropertiesundefinedRawSourceU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js f webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared063undefined6571undefined107129__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB36151async_local_storage_createAsyncLocalStorageundefinedRawSourceU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js d@webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared54181undefined183242undefined4 ;// ./node_modules/next/dist/esm/lib/picocolors.js c_webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware17941800undefined18151814(/* unused pure expression or super */ null && (undefined18591858))undefined18611867undefined19341940undefined20062012undefined20622068undefined21212127undefined21782184undefined22342240undefined22972303undefined23532359undefined24072413undefined24632469undefined25202526undefined25752581undefined26332639undefined27042710undefined27592765undefined28152821undefined28702876undefined29282934undefined29842990undefined30423048undefined31013107undefined31583164undefined32183224undefined32753281undefinedL18001804picocolors_resetundefined21922197picocolors_hiddenundefinedRawSource6 ;// ./node_modules/next/dist/esm/build/output/log.js awebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware079undefined81134undefined136142undefined172176__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined178181__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined201203__WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__._undefined205208__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined227232__WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__._undefined234237__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined272276__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined278281__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined301305__WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__._undefined307310__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined330336__WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__._undefined338341__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined12661272undefined14931499undefined15671573undefined16431649undefined17171723undefined17931799undefined18671873undefined19431949undefined20452052__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined20852091undefined`31110whiteundefined112189boldundefined209284redundefined286363boldundefined382463yellowundefined465542boldundefined577656whiteundefined658735boldundefined755834greenundefined836913boldundefined9331016magentaundefined10181095boldundefined25882592log_eventundefined26572661log_traceundefined27432823LRUCacheundefined28652872log_warnOnceundefinedRawSource@ ;// ./node_modules/next/dist/esm/server/request/root-params.js  y5import { InvariantError } from '../../shared/lib/invariant-error'; import { postponeWithTracking, throwToInterruptStaticGeneration } from '../app-render/dynamic-rendering'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils'; import { actionAsyncStorage } from '../app-render/action-async-storage.external'; import { warnOnce } from '../../build/output/log'; const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map H{"version":3,"sources":["webpack://../../../src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SACEC,oBAAoB,EACpBC,gCAAgC,QAC3B,kCAAiC;AACxC,SACEC,gBAAgB,QAEX,4CAA2C;AAClD,SACEC,oBAAoB,QAIf,iDAAgD;AACvD,SAASC,kBAAkB,QAAQ,6BAA4B;AAG/D,SACEC,4BAA4B,EAC5BC,mBAAmB,QACd,uCAAsC;AAC7C,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,QAAQ,QAAQ,yBAAwB;AAGjD,MAAMC,eAAe,IAAIC;AAEzB;;CAEC,GACD,OAAO,eAAeC;IACpBH,SACE;IAEF,MAAMI,YAAYV,iBAAiBW,QAAQ;IAC3C,IAAI,CAACD,WAAW;QACd,MAAM,OAAA,cAA8D,CAA9D,IAAIb,eAAe,6CAAnB,qBAAA;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMe,gBAAgBX,qBAAqBU,QAAQ;IAEnD,IAAI,CAACC,eAAe;QAClB,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,8FAA8F,CAAC,GADpH,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,OAAQF,cAAcG,IAAI;QACxB,KAAK;QACL,KAAK;YAAkB;gBACrB,MAAM,OAAA,cAEL,CAFK,IAAIF,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,kKAAkK,CAAC,GADxL,qBAAA;2BAAA;gCAAA;kCAAA;gBAEN;YACF;QACA,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAOE,0BACLJ,cAAcK,UAAU,EACxBP,WACAE;QAEJ,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAOM,QAAQC,OAAO,CAACP,cAAcK,UAAU;QACjD;YACE,OAAOL;IACX;AACF;AAEA,SAASI,0BACPI,gBAAw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,qBAAA;2BAAA;gCAAA;kCAAA;gBAEN;YACF;QACA,KAAK;QACL,KAAK;QACL,KAAK;QACL;IACF;IAEA,MAAMxB,mBAAmBC,eAAeJ,UAAU;IAElD,OAAQI,eAAeN,IAAI;QACzB,KAAK;YAAa;gBAChB,mCAAmC;gBACnC,+DAA+D;gBAC/D,IACEM,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOzC,mBACLmB,eAAeS,YAAY,EAC3BpB,UAAUI,KAAK,EACf8B;gBAEJ;gBACA;YACF;QACA,KAAK;YAAiB;gBACpB,mEAAmE;gBACnE,0FAA0F;gBAC1F,IACEvB,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOO,6BACLP,WACAjC,WACAW,gBACAuB;gBAEJ;gBACA;YACF;QACA,KAAK;YAAoB;gBAEvB;YACF;QACA;YAAS;gBACPvB;YACF;IACF;IAEA,uFAAuF;IACvF,OAAOH,QAAQC,OAAO,CAACC,gBAAgB,CAACuB,UAAU;AACpD;AAEA,yFAAyF,GACzF,eAAeO,6BACbP,SAAiB,EACjBjC,SAAoB,EACpBW,cAAwD,EACxDuB,OAAe;IAEf,MAAML,aAAapC,6BAA6ByC,SAASD;IACzD,8DAA8D;IAC9D,gFAAgF;IAChF,yFAAyF;IACzF,qGAAqG;IACrG,OAAQtB,eAAeN,IAAI;QACzB,KAAK;YAAiB;gBACpB,OAAOjB,qBACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACF","ignoreList":[0],"file":"x"}false065undefined67171undefined173249undefined251336undefined338401undefined403507undefined509589undefined591640undefined762768undefined73687374undefined> ;// ./node_modules/next/dist/esm/server/web/exports/index.js \webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware77141undefined143198undefined200257undefined259336undefined338396undefined398433undefined435488undefined490553undefined0 ;// ./node_modules/next/dist/esm/api/server.js [Ywebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware043undefined ;// ./src/middleware.js import { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; {"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings":"AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAAKK,GAAG,CAACI,KAAKQ,MAAM,CAACC,CAAAA,IAAKN,MAAMM,IAAIP;IACvDK,WAAWG,IAAI,CAACP;IAChBZ,KAAKe,GAAG,CAACN,KAAKO;IACd,OAAO;QACLI,SAASJ,WAAWK,MAAM,IAAIX;QAC9BY,WAAWC,KAAKb,GAAG,CAAC,GAAGA,MAAMM,WAAWK,MAAM;QAC9CG,OAAOD,KAAKE,IAAI,CAACb,MAAM,QAAQW,KAAKE,IAAI,CAACd,WAAW;IACtD;AACF;AAEA,OAAO,SAASe,WAAWvB,OAAO;IAChC,MAAM,EAAEwB,QAAQ,EAAE,GAAGxB,QAAQyB,OAAO;IACpC,IAAI,CAACD,SAASE,UAAU,CAAC,UAAU,OAAOhC,aAAaiC,IAAI;IAE3D,MAAMC,KAAK7B,YAAYC;IACvB,MAAM6B,WAAWC,QAAQC,GAAG,CAACC,SAAS,IAAIF,QAAQC,GAAG,CAACE,oBAAoB,KAAK;IAE/E,IAAI,CAACJ,UAAU;QACb,MAAMK,SAAS7B,oBAAoB,CAAC,GAAG,EAAEuB,IAAI;QAC7C,IAAI,CAACM,OAAOjB,OAAO,EAAE;YACnB,OAAO,IAAIvB,aAAayC,KAAKC,SAAS,CAAC;gBAAEC,OAAO;YAAwC,IAAI;gBAC1FC,QAAQ;gBACRrC,SAAS;oBACP,gBAAgB;oBAChB,qBAAqBsC,OAAO3C;oBAC5B,yBAAyB;oBACzB,qBAAqB2C,OAAOL,OAAOb,KAAK;oBACxC,iBAAiB;gBACnB;YACF;QACF;QACA,MAAMmB,WAAW9C,aAAaiC,IAAI;QAClCa,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAO3C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,aAAaiC,IAAI;AAC1B;AAEA,OAAO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAE","file":"x"}false042undefined746752undefined872883__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined11531164__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._undefined16711682__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19631974__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19861992undefined{822902NextResponseundefined11721260NextResponseundefined17671847NextResponseundefined21282208NextResponseundefinedRawSourcea ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js 1export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } export function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } export function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map  {"version":3,"sources":["webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"file":"x"}Nfalse06undefined173179undefined515521undefined864870undefined10011007undefinedF510534http_access_fallback_isHTTPAccessFallbackErrorundefinedRawSourceL ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js export var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map h{"version":3,"sources":["webpack://../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0],"file":"x"}<421redirect_status_code_RedirectStatusCodeundefinedRawSourceF ;// ./node_modules/next/dist/esm/client/components/redirect-error.js cimport { RedirectStatusCode } from './redirect-status-code'; export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; export var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map i{"version":3,"sources":["webpack://../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAA,CAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0],"file":"x"}<false059undefined6167undefined113119undefined502508undefined6437451redirect_error_isRedirectErrorundefinedRawSourceL ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js import { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback'; import { isRedirectError } from './redirect-error'; /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map {"version":3,"sources":["webpack://../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0],"file":"x"}.false087undefined89139undefined316322undefined ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19! Hwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware037undefined3993undefined124187undefined189269undefined271355undefined378381__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._undefined12221258falseundefined12611471{}undefined16221654__WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__._undefined20442058undefined20962102__WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._undefinedr55100middleware_namespaceObjectundefined11001234edgeInstrumentationOnRequestErrorundefined16611744adapterundefined /***/ }) m/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (false) {} // The condition is true when the "process" module is provided if (process !== __webpack_require__.g.process) { // prefer local process but global.process has correct "env" process.env = __webpack_require__.g.process.env; __webpack_require__.g.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.map ;// ./node_modules/next/dist/esm/server/web/error.js class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map ;// ./node_modules/next/dist/esm/lib/constants.js const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; const MATCHED_PATH_HEADER = 'x-matched-path'; const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; const RSC_SEGMENT_SUFFIX = '.segment.rsc'; const RSC_SUFFIX = '.rsc'; const ACTION_SUFFIX = '.action'; const NEXT_DATA_SUFFIX = '.json'; const NEXT_META_SUFFIX = '.meta'; const NEXT_BODY_SUFFIX = '.body'; const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well const NEXT_CACHE_TAG_MAX_ITEMS = 128; const NEXT_CACHE_TAG_MAX_LENGTH = 256; const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files const MIDDLEWARE_FILENAME = 'middleware'; const MIDDLEWARE_LOCATION_REGEXP = (/* unused pure expression or super */ null && (`(?:src/)?${MIDDLEWARE_FILENAME}`)); // Pattern to detect instrumentation hooks file const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias const PAGES_DIR_ALIAS = 'private-next-pages'; const DOT_NEXT_ALIAS = 'private-dot-next'; const ROOT_DIR_ALIAS = 'private-next-root-dir'; const APP_DIR_ALIAS = 'private-next-app-dir'; const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; const PUBLIC_DIR_MIDDLEWARE_CONFLICT = (/* unused pure expression or super */ null && (`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`)); const SSG_GET_INITIAL_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`)); const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`)); const SERVER_PROPS_SSG_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`)); const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = (/* unused pure expression or super */ null && (`can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`)); const SERVER_PROPS_EXPORT_ERROR = (/* unused pure expression or super */ null && (`pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`)); const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; const UNSTABLE_REVALIDATE_RENAME_ERROR = (/* unused pure expression or super */ null && ('The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.')); const GSSP_COMPONENT_MEMBER_ERROR = (/* unused pure expression or super */ null && (`can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`)); const NON_STANDARD_NODE_ENV = (/* unused pure expression or super */ null && (`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`)); const SSG_FALLBACK_EXPORT_ERROR = (/* unused pure expression or super */ null && (`Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`)); const ESLINT_DEFAULT_DIRS = (/* unused pure expression or super */ null && ([ 'app', 'pages', 'components', 'lib', 'src' ])); const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/server/web/utils.js /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js /** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/server/web/next-url.js const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !undefined, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js //# sourceMappingURL=cookies.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (false) {} if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new _edge_runtime_cookies.RequestCookies(this.headers), nextUrl, url: false ? 0 : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js const response_INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new _edge_runtime_cookies.ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof _edge_runtime_cookies.ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>(0,_edge_runtime_cookies.stringifyCookie)(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[response_INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[response_INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js /** * The result of parsing a URL relative to a base URL. */ function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/server/internal-utils.js const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js /** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/segment.js function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } const PAGE_SEGMENT_KEY = '__PAGE__'; const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js /** * @internal */ class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function async_local_storage_createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js const workAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=work-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js /** * @internal */ class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } class request_cookies_RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorageInstance.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } function request_cookies_responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js /** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var constants_NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(constants_NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js /** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (true) { api = __webpack_require__(817); } else {} const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const tracer_getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); //# sourceMappingURL=tracer.js.map ;// ./node_modules/next/dist/esm/server/api-utils/index.js function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; const RESPONSE_LIMIT_DEFAULT = (/* unused pure expression or super */ null && (4 * 1024 * 1024)); const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = __webpack_require__(663); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. false && 0)); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.map ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new _edge_runtime_cookies.ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = request_cookies_RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js const workUnitAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const app_router_headers_RSC_HEADER = 'rsc'; const app_router_headers_ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const app_router_headers_NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const app_router_headers_NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const components_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const app_router_headers_NEXT_URL = 'next-url'; const app_router_headers_RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const app_router_headers_FLIGHT_HEADERS = [ app_router_headers_RSC_HEADER, app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER, app_router_headers_NEXT_ROUTER_PREFETCH_HEADER, app_router_headers_NEXT_HMR_REFRESH_HEADER, app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const app_router_headers_NEXT_RSC_UNION_QUERY = '_rsc'; const app_router_headers_NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const app_router_headers_NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const app_router_headers_NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const app_router_headers_NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const app_router_headers_NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const app_router_headers_NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js // Share the instance module in the next-shared layer function work_unit_async_storage_external_throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function work_unit_async_storage_external_getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class lib_invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js /** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.map ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. const tagsManifest = new Map(); const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js /* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; /** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const default_external_DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; /* harmony default export */ const default_external = ((/* unused pure expression or super */ null && (default_external_DefaultCacheHandler))); //# sourceMappingURL=default.external.js.map ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js const handlers_debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { handlers_debug == null ? void 0 : handlers_debug('cache handlers already initialized'); return false; } handlers_debug == null ? void 0 : handlers_debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } handlers_debug == null ? void 0 : handlers_debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map ;// ./node_modules/next/dist/esm/server/revalidation-utils.js /** Run a callback, and execute any *new* revalidations added during its runtime. */ async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const async_local_storage_sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class async_local_storage_FakeAsyncLocalStorage { disable() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } exit() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const async_local_storage_maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function app_render_async_local_storage_createAsyncLocalStorage() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return new async_local_storage_maybeGlobalAsyncLocalStorage(); } return new async_local_storage_FakeAsyncLocalStorage(); } function async_local_storage_bindSnapshot(fn) { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.bind(fn); } return async_local_storage_FakeAsyncLocalStorage.bind(fn); } function async_local_storage_createSnapshot() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js const afterTaskAsyncStorageInstance = app_render_async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=after-task-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/after/after-context.js class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new (p_queue_default())(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorageInstance.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorageInstance.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = async_local_storage_bindSnapshot(async ()=>{ try { await afterTaskAsyncStorageInstance.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorageInstance.getStore(); if (!workStore) { throw Object.defineProperty(new lib_invariant_error_InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new lib_invariant_error_InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js /** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.map ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: async_local_storage_createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map ;// ./node_modules/next/dist/esm/server/web/web-on-close.js /** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.map ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js /** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js /** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map ;// ./node_modules/next/dist/esm/server/web/adapter.js class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = tracer_getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm __webpack_require__(720); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = false ? 0 : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: "production" !== 'development', fetchCacheKeyPrefix: "", dev: "production" === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return tracer_getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorageInstance.run(workStore, ()=>workUnitAsyncStorageInstance.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if ( true && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !( false && 0)) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (true) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js const GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; //# sourceMappingURL=url-pattern.js.map ;// ./node_modules/next/dist/esm/server/after/after.js /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map ;// ./node_modules/next/dist/esm/server/after/index.js //# sourceMappingURL=index.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class hooks_server_context_DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class static_generation_bailout_StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ function dynamic_rendering_utils_makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js // This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ class bailout_to_csr_BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js /** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly const hasPostpone = typeof react_react_server.unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return dynamic_rendering_postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if (false) {} break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ function dynamic_rendering_throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ function dynamic_rendering_trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if (false) {} break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport const trackSynchronousRequestDataAccessInDev = (/* unused pure expression or super */ null && (trackSynchronousPlatformIOAccessInDev)); function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; dynamic_rendering_postponeWithTracking(route, reason, dynamicTracking); } function dynamic_rendering_postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return dynamic_rendering_postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = false ? 0 : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map ;// ./node_modules/next/dist/esm/server/request/utils.js function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } function utils_isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/request/connection.js /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if (false) {} else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js // This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; function reflect_utils_describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } const reflect_utils_wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js const actionAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=action-async-storage.external.js.map ;// ./node_modules/next/dist/esm/lib/picocolors.js // 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'); 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; }; }; const picocolors_reset = (/* unused pure expression or super */ null && (enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String)); const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m'); const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m'); const italic = formatter('\x1b[3m', '\x1b[23m'); const underline = formatter('\x1b[4m', '\x1b[24m'); const inverse = formatter('\x1b[7m', '\x1b[27m'); const picocolors_hidden = formatter('\x1b[8m', '\x1b[28m'); const strikethrough = formatter('\x1b[9m', '\x1b[29m'); const black = formatter('\x1b[30m', '\x1b[39m'); const red = formatter('\x1b[31m', '\x1b[39m'); const green = formatter('\x1b[32m', '\x1b[39m'); const yellow = formatter('\x1b[33m', '\x1b[39m'); const blue = formatter('\x1b[34m', '\x1b[39m'); const magenta = formatter('\x1b[35m', '\x1b[39m'); const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m'); const cyan = formatter('\x1b[36m', '\x1b[39m'); const white = formatter('\x1b[37m', '\x1b[39m'); const gray = formatter('\x1b[90m', '\x1b[39m'); const bgBlack = formatter('\x1b[40m', '\x1b[49m'); const bgRed = formatter('\x1b[41m', '\x1b[49m'); const bgGreen = formatter('\x1b[42m', '\x1b[49m'); const bgYellow = formatter('\x1b[43m', '\x1b[49m'); const bgBlue = formatter('\x1b[44m', '\x1b[49m'); const bgMagenta = formatter('\x1b[45m', '\x1b[49m'); const bgCyan = formatter('\x1b[46m', '\x1b[49m'); const bgWhite = formatter('\x1b[47m', '\x1b[49m'); //# sourceMappingURL=picocolors.js.map ;// ./node_modules/next/dist/esm/build/output/log.js const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } function wait(...message) { prefixedLog('wait', ...message); } function error(...message) { prefixedLog('error', ...message); } function warn(...message) { prefixedLog('warn', ...message); } function ready(...message) { prefixedLog('ready', ...message); } function info(...message) { prefixedLog('info', ...message); } function log_event(...message) { prefixedLog('event', ...message); } function log_trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); function log_warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map ;// ./node_modules/next/dist/esm/server/request/root-params.js const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map ;// ./node_modules/next/dist/esm/server/web/exports/index.js // Alias index file of next/server for edge runtime for tree-shaking purpose //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/api/server.js //# sourceMappingURL=server.js.map ;// ./src/middleware.js const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } const config = { matcher: "/api/:path*" }; ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ function http_access_fallback_isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js var redirect_status_code_RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-error.js const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ function redirect_error_isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19! // Import the userland code. const mod = { ...middleware_namespaceObject }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (false) {} const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map /***/ }) x;;;;;;;;;;;;;;;;;;;;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEA;;ACrGO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC3BO;AACA,6CAA6C;AAC7C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACO;AACA;AACA;AACA;AACP;AACO;AACP;AACA;AACA;AACO;AACP;AACO;AACA,mCAAmC,4DAAY,oBAAoB,CAAC;AAC3E;AACO;AACP;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+NAA+K;AACtN,uCAAuC,qJAAqG;AAC5I,6CAA6C,yIAAyF;AACtI,kCAAkC,wKAAwH;AAC1J,mDAAmD,yJAAyG;AAC5J,kCAAkC,yKAAyH;AAC3J;AACA;AACA,yCAAyC,yJAAyG;AAClJ,oCAAoC,0MAA0J;AAC9L,8BAA8B,mQAAmN;AACjP,kCAAkC,0MAA0J;AAC5L,4BAA4B;AACnC;AACA;AACA;AACA;AACA;AACA,CAAC;AACM;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD;;ACvK+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,yDAAyD;AACzD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN,mEAAmE,YAAY;AAC/E;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA,QAAQ,uBAAuB;AAC/B,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AChJ8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gHAAgH;AAChH;AACO;AACP;AACA;AACA;AACA;AACA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GAC7BR,QAAQQ,YAAY,CAACC,OAAO,CAACnC,KAAKhB,QAAQ,IAC1C8B,mBAAmBA,CAACd,KAAKhB,QAAQ,EAAE2C,KAAKvD,OAAO;QAEnD4B,KAAK1B,MAAM,GAAG2D,OAAOpE,cAAc;YACnBoE;QAAhBjC,KAAKhB,QAAQ,GAAGiD,CAAAA,mBAAAA,OAAOjD,QAAAA,KAAQ,OAAfiD,mBAAmBjC,KAAKhB,QAAQ;QAEhD,IAAI,CAACiD,OAAOpE,cAAc,IAAImC,KAAKC,OAAO,EAAE;YAC1CgC,SAASP,QAAQQ,YAAY,GACzBR,QAAQQ,YAAY,CAACC,OAAO,CAACN,wBAC7Bf,mBAAmBA,CAACe,sBAAsBF,KAAKvD,OAAO;YAE1D,IAAI6D,OAAOpE,cAAc,EAAE;gBACzBmC,KAAK1B,MAAM,GAAG2D,OAAOpE,cAAc;YACrC;QACF;IACF;IACA,OAAOmC;AACT;;;AC9GgF;AACiB;AACrC;AAC+B;AAC3F,qGAAqG,EAAE;AACvG;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA,wBAAwB,SAA8C;AACtE;AACA,SAAS;AACT,yBAAyB,WAAW;AACpC,+IAA+I,kBAAkB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;ACxL4G;;AAE5G;;ACFsC;AAC4B;AACN;AACjB;AACpC;AACP;AACA;AACA;AACA;AACA,IAAW;AACX,gCAAgC;AAChC;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA;AACA,YAAY,KAAmC,EAAE,EAIxC;AACT;AACA;AACA,4BAA4B,OAAO;AACnC,qBAAqB,yBAAyB;AAC9C;AACA,SAAS;AACT;AACA,yBAAyB,oCAAc;AACvC;AACA,iBAAiB,MAA8C,GAAG,CAAG;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;;AAEA;;AChFO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACnBmE;AAC7B;AAC4B;AACd;AACR;AAC5C,MAAM,kBAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX,+BAA+B;AAC/B;AACA;AACA,4BAA4B,qCAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,qCAAe;AACrE,yGAAyG,yCAAe;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT,aAAa,kBAAS;AACtB;AACA,gCAAgC,OAAO;AACvC,yBAAyB,yBAAyB;AAClD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,4CAA4C,WAAW;AACvD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;ACjIA;;CAEC,GAaM,SAASoC,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAAS9B,QAAQ,GAAGtB,KAAK,CAACkD,QAAQI,MAAM,CAACrB,MAAM,IAC/CmB,SAAS9B,QAAQ;QACrB+B;IACF;AACF;AAEA;;;;CAIC,GACM,SAASE,eAAeP,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iB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AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC3KA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2CAAuB;AACvC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AChDgE;AACzD,iCAAiC,2CAAuB;;AAE/D;;ACHA;AAGE;AACsD;;AAExD;;ACN4C;AACC;AACF;AACwC;AACnF;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,qCAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qCAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,+CAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA,CAAC,iBAAiB;AAClB,IAAI,kBAAQ;AACZ;AACA;AACA,CAAC,CAAC,kBAAQ,MAAM;AAChB;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACsN;;AAEtN;;ACvIA;;;;;CAKC,GACM,SAASoG,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B;;;ACfyE;AACZ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAmC;AACvC,UAAU,mBAAO,CAAC,GAAoB;AACtC,EAAE,KAAK,EAMN;AACD,QAAQ,sEAAsE;AACvE;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B,QAAQ,oFAAoF;AACxK;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAS;AACf;AACA;AACA,CAAC;AAC8C;;AAE/C;;ACvOwE;AACsC;AAC9D;AACE;AAC3C;AACP;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP,oBAAoB,cAAc;AAClC,sCAAsC,2BAA2B;AACjE;AACA,gDAAgD,0CAA0C;AAC1F;AACA;AACA;AACA;AACA;AACO;AACA;AACA,+BAA+B,+DAAe;AAC9C;AACA;AACA,2CAA2C;AAClD;AACA;AACA;AACA,YAAY,YAAY,EAAE,mBAAO,CAAC,GAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW,uBAAuB,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEA;;AC3JuF;AAChF;AACP;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E,wDAAwD,4BAA4B;AACpF;AACA,QAAQ,MAAqC,IAAI,CAA+C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;ACnD4E;AACJ;AACmH;AAC3G;AACtB;AACR;AAClD;AACA,oBAAoB,cAAc;AAClC,yBAAyB,cAAc;AACvC;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA,wBAAwB,oCAAc,CAAC,cAAc;AACrD,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,oCAAc,CAAC,cAAc;AACxE;AACA;AACA;AACA,gCAAgC,qCAAqB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gDAAgD,mCAAmC;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,iBAAiB;AACvD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;;ACrHgE;AACzD,qCAAqC,2CAAuB;;AAEnE;;AhBHO,MAAMlC,6BAAUA,GAAG,MAAc;AACjC,MAAMC,gCAAaA,GAAG,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AACxD,MAAMC,gDAA6BA,GAAG,yBAAiC;AACvE,MAAMC,8CAA2BA,GAAG,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AACzB,MAAMC,sDAAmCA,GAC9C,+BAAuC;AAClC,MAAMC,0CAAuBA,GAAG,mBAA2B;AAC3D,MAAMC,0DAA4BA,GAAG,4BAAoC;AACzE,MAAMC,2BAAQA,GAAG,WAAmB;AACpC,MAAMC,0CAAuBA,GAAG,mBAA2B;AAE3D,MAAMC,iCAAcA,GAAG;IAC5BT,6BAAUA;IACVE,gDAA6BA;IAC7BC,8CAA2BA;IAC3BE,0CAAuBA;IACvBD,sDAAmCA;CACpC,CAAS;AAEH,MAAMM,uCAAoBA,GAAG,OAAe;AAE5C,MAAMC,gDAA6BA,GAAG,sBAA8B;AACpE,MAAMC,2CAAwBA,GAAG,qBAA6B;AAC9D,MAAMC,6CAA0BA,GAAG,0BAAkC;AACrE,MAAMC,8CAA2BA,GAAG,2BAAmC;AACvE,MAAMC,2CAAwBA,GAAG,qBAA6B;AAC9D,MAAMC,+CAA4BA,GAAG,4BAAoC;;;AiBjCzE,MAAMmB,8BAAcA,SAASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;ACRA;AAGE;AACwF;AACxB;AACF;AACzD,SAAS,4DAA2B;AAC3C,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uDAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;AD1LO,MAAMJ,kCAAcA,SAASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;AERA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AC1C;AACA;AACA;AACA;AACA,YAAY,cAAK,oBAAoB,cAAK;AAC1C;AACA,UAAU;AACV,YAAY,cAAK,oBAAoB,cAAK;AAC1C;AACA;AACA,MAAM;AACN,QAAQ,cAAK,oBAAoB,cAAK;AACtC;AACA,QAAQ,cAAK,oBAAoB,cAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,IAAI,cAAK,oBAAoB,cAAK;AAClC;AACA;AACA;;AAEA;;AC1GwD;AACxD,qFAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACjEA,MAAM,4DAAwC;AAC9C;AACA;AACA;AACA,CAAC;AACD,MAAM,yCAAqB;AAC3B;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,MAAM,gDAA4B;AAC3B,SAAS,sDAAuB;AACvC,QAAQ,gDAA4B;AACpC,mBAAmB,gDAA4B;AAC/C;AACA,eAAe,yCAAqB;AACpC;AACO,SAAS,gCAAY;AAC5B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA,WAAW,yCAAqB;AAChC;AACO,SAAS,kCAAc;AAC9B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;;AChDgE;AACzD,sCAAsC,sDAAuB;;AAEpE;;ACHA;AAGE;AAC+B;;AAEjC;;ACNsD;AACY;AACR;AACmB;AACd;AACE;AACqB;AACE;AACjF;AACP,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA,iCAAiC,mBAAY;AAC7C;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAAoB;AAClD;AACA;AACA;AACA,+BAA+B,6BAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAY;AAC5C;AACA,sBAAsB,6BAAqB;AAC3C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAgB;AAC1C;AACA,4CAA4C,kCAAc;AAC1D;AACA;AACA;AACA,aAAa;AACb;AACA,eAAe,sBAAsB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,wDAAwD,kCAAc;AACtE;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AC1HA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEA;;AC3BsD;AACqB;AACrB;AACS;AACI;AAC5D,2BAA2B,yEAAyE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kCAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD,eAAe,YAAY;AAC3B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;;AAEA;;AClFA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yDAAyD,UAAU,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC5DA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACZ4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AClBiE;AACF;AACd;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,sCAAsC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B,CAAC,EAAE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B,CAAC,EAAE,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC5DA;AACA;AACA,kCAAkC;AAClC,IAAW;AACX;AACA;;AAEA;;ACP6C;AACkC;AACa;AACrC;AACE;AACuC;AAC3D;AACyB;AACY;AAC6F;AAC3G;AACc;AACY;AACxB;AACe;AACY;AACzC;AACQ;AACP;AACc;AACa;AACrB;AACI;AACpD,8BAA8B,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D,YAAY,mBAAO,CAAC,GAA6C;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA,yBAAyB,eAAe;AACxC,gFAAgF,OAAO;AACvF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA,yBAAyB,kBAAkB,oBAAoB,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAA8C,GAAG,CAA2B;AACrG,kDAAkD,oBAAoB;AACtE;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAoB;AAC7C,iCAAiC,EAAyC;AAC1E,iBAAiB,YAAoB;AACrC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,qCAAqC;AACrC;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qFAAqF,wBAAwB;AAC7G,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD,mBAAmB,gBAAS,SAAS,cAAc;AACnD,wCAAwC,gBAAgB,EAAE,yBAAyB;AACnF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D,yCAAyC,wBAAwB;AACjE,sCAAsC,eAAe;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,yBAAyB;AACzB,+DAA+D,2BAA2B;AAC1F;AACA;AACA,qBAAqB;AACrB,iCAAiC,wBAAgB,oBAAoB,4BAAoB;AACzF,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT,YAAY,KAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC,EAAE,gBAAgB;AACzE;AACA;AACA;AACA,UAAU,MAAsD,IAAI,CAA0C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA,qCAAqC,2BAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,oBAAoB;AAC7D,wCAAwC,oBAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,YAAY,IAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA,gDAAgD,YAAY;AAC5D;AACA;AACA;AACA;AACA;AACA,8DAA8D,IAAI;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;;AAEA;;;;AC1WsD;AAC/C;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO,qBAAqB,SAAS;AACrC;AACA;;AAEA;;ACdA;AACA;AAC0C;;AAE1C;;ACJ6E;AAC7E;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY,eAAe;AAC3B;AACA;;AAEA;;ACjBwB;;AAExB;;;;ACFA,MAAMqC,qBAAqB;AAEpB,MAAMC,uCAAkBA,SAAS5D;IAGtCC,YAA4B4D,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,C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B;;AAEjE;;ACHA;AAGE;AAC0D;;AAE5D;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAK,GAAG,yEAAyB,EAAE,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAM;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,EAAE,IAAI,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEP;;AC1DgF;AAC1B;AAC/C;AACP,UAAU,KAAK,CAAC,IAAI;AACpB,WAAW,GAAG,CAAC,IAAI;AACnB,UAAU,MAAM,CAAC,IAAI;AACrB;AACA,UAAU,KAAK,CAAC,IAAI;AACpB,WAAW,KAAK,CAAC,IAAI;AACrB,WAAW,OAAO,CAAC,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO,SAAS,SAAK;AACrB;AACA;AACO,SAAS,SAAK;AACrB;AACA;AACA,0BAA0B,QAAQ;AAC3B,SAAS,YAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACvEiE;AAIzB;AAIU;AAMK;AACQ;AAMlB;AACmC;AAC/B;AAGjD,MAAMG,eAAe,IAAInR;AAEzB;;CAEC,GACM,eAAeoR;IACpBF,SACE;IAEF,MAAMnD,YAAY/E,iBAAiBwD,QAAQ;IAC3C,IAAI,CAACuB,WAAW;QACd,MAAM,qBAA8D,CAA9D,IAAI5J,eAAe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AG0C,IAAI,CAAC;IAC7C,MAAMgT,SAAShM,OAAOuN,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaV,OAAOd;IAE1B,OACEqB,cAAcH,uBACb3K,CAAAA,SAAS,aAAaA,SAAS,OAAK,IACrC,OAAO+K,gBAAgB,YACvB,CAACG,MAAMD,eACPA,cAAcP;AAElB;;;ACzCoD;AACkB;AAEtE;;;;CAIC,GACM,SAASS,kBACdpN,KAAc;IAEd,OAAO8M,gBAAgB9M,UAAUsM,0BAA0BtM;AAC7D;;;ACfsC;AACiB;AACvD;AACgE;AACiB;AACI;AACrF;AACA,OAAO,0BAAI;AACX;AACA;AACA;AACA;AACA,6DAA6D,KAAK;AAClE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,gBAAgB,KAAqC,EAAE,EAK1C;AACb;AACA;AACA;AACA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACe;AACf,WAAW,OAAO;AAClB;AACA;AACA;AACA,KAAK;AACL;;AAEA`UUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middlewarePwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middlewarewebpack://../../../../src/shared/lib/i18n/detect-domain-locale.tswebpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.tswebpack://../../../../../src/shared/lib/router/utils/parse-path.tswebpack://../../../../../src/shared/lib/router/utils/add-path-prefix.tswebpack://../../../../../src/shared/lib/router/utils/add-path-suffix.tswebpack://../../../../../src/shared/lib/router/utils/path-has-prefix.tswebpack://../../../../../src/shared/lib/router/utils/add-locale.tswebpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.tswebpack://../../../src/shared/lib/get-hostname.tswebpack://../../../../src/shared/lib/i18n/normalize-locale-path.tswebpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.tswebpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.tsVwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middlewaremwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middlewareewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middlewarewebpack://../../../../../src/shared/lib/router/utils/relativize-url.tswebpack://../../../src/client/components/app-router-headers.tsXwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middlewarewebpack://../../../../src/shared/lib/page-path/ensure-leading-slash.tswebpack://../../../src/shared/lib/segment.tswebpack://../../../../../src/shared/lib/router/utils/app-paths.tsmwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middlewarewebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|sharedwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared!webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shareduwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middlewarewebpack://../../../src/shared/lib/is-thenable.tsZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middlewareYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middlewarekwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middlewareewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middlewarewebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|sharedwebpack://../../../src/shared/lib/invariant-error.ts&webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|sharedWwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middlewarewebpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.tswebpack://../../../../src/server/lib/cache-handlers/default.external.ts\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middlewarevwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middlewarevwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware]webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middlewareYwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middlewarebwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middlewareZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middlewaredwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middlewaregwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middlewaregwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middlewarehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middlewareUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middlewarewebpack://../../../src/client/components/hooks-server-context.tswebpack://../../../src/client/components/static-generation-bailout.tsawebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middlewarecwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middlewarewebpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.tswebpack://../../../src/server/app-render/dynamic-rendering.tswebpack://../../../src/server/request/utils.tswebpack://../../../src/server/request/connection.tswebpack://../../../../src/shared/lib/utils/reflect-utils.tswebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|sharedQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middlewareSwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middlewarewebpack://../../../src/server/request/root-params.ts[webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middlewareMwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middlewarewebpack://./src/middleware.jswebpack://../../../../src/client/components/http-access-fallback/http-access-fallback.tswebpack://../../../src/client/components/redirect-status-code.tswebpack://../../../src/client/components/redirect-error.tswebpack://../../../src/client/components/is-next-router-error.tswebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware`Uexport async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } export async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; export function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (process.env.NEXT_RUNTIME !== 'edge') { return; } // The condition is true when the "process" module is provided if (process !== global.process) { // prefer local process but global.process has correct "env" process.env = global.process.env; global.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.mapSexport class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } export class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } export class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; export const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; export const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; export const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; export const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; export const MATCHED_PATH_HEADER = 'x-matched-path'; export const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; export const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; export const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; export const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; export const RSC_SEGMENT_SUFFIX = '.segment.rsc'; export const RSC_SUFFIX = '.rsc'; export const ACTION_SUFFIX = '.action'; export const NEXT_DATA_SUFFIX = '.json'; export const NEXT_META_SUFFIX = '.meta'; export const NEXT_BODY_SUFFIX = '.body'; export const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; export const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; export const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; export const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well export const NEXT_CACHE_TAG_MAX_ITEMS = 128; export const NEXT_CACHE_TAG_MAX_LENGTH = 256; export const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; export const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds export const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. export const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files export const MIDDLEWARE_FILENAME = 'middleware'; export const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`; // Pattern to detect instrumentation hooks file export const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias export const PAGES_DIR_ALIAS = 'private-next-pages'; export const DOT_NEXT_ALIAS = 'private-dot-next'; export const ROOT_DIR_ALIAS = 'private-next-root-dir'; export const APP_DIR_ALIAS = 'private-next-app-dir'; export const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; export const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; export const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; export const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; export const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; export const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; export const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`; export const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`; export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`; export const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`; export const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`; export const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`; export const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; export const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; export const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.'; export const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`; export const NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`; export const SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`; export const ESLINT_DEFAULT_DIRS = [ 'app', 'pages', 'components', 'lib', 'src' ]; export const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; export { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }; //# sourceMappingURL=constants.js.mapimport { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants'; /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ export function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ export function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ export function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ export function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map import { PageSignatureError } from '../error'; const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } export function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } export class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.mapimport type { DomainLocale } from '../../../server/config-shared' export function detectDomainLocale( domainItems?: readonly DomainLocale[], hostname?: string, detectedLocale?: string ) { if (!domainItems) return if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase() } for (const item of domainItems) { // remove port if present const domainHostname = item.domain?.split(':', 1)[0].toLowerCase() if ( hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale) ) { return item } } } /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route: string) { return route.replace(/\/$/, '') || '/' } /** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path: string) { const hashIndex = path.indexOf('#') const queryIndex = path.indexOf('?') const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex) if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '', } } return { pathname: path, query: '', hash: '' } } import { parsePath } from './parse-path' /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path: string, prefix?: string) { if (!path.startsWith('/') || !prefix) { return path } const { pathname, query, hash } = parsePath(path) return `${prefix}${pathname}${query}${hash}` } import { parsePath } from './parse-path' /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path: string, suffix?: string) { if (!path.startsWith('/') || !suffix) { return path } const { pathname, query, hash } = parsePath(path) return `${pathname}${suffix}${query}${hash}` } )import { parsePath } from './parse-path' /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path: string, prefix: string) { if (typeof path !== 'string') { return false } const { pathname } = parsePath(path) return pathname === prefix || pathname.startsWith(prefix + '/') } import { addPathPrefix } from './add-path-prefix' import { pathHasPrefix } from './path-has-prefix' /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale( path: string, locale?: string | false, defaultLocale?: string, ignorePrefix?: boolean ) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path const lower = path.toLowerCase() // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path } // Add the locale prefix to the path. return addPathPrefix(path, `/${locale}`) } +import type { NextPathnameInfo } from './get-next-pathname-info' import { removeTrailingSlash } from './remove-trailing-slash' import { addPathPrefix } from './add-path-prefix' import { addPathSuffix } from './add-path-suffix' import { addLocale } from './add-locale' interface ExtendedInfo extends NextPathnameInfo { defaultLocale?: string ignorePrefix?: boolean } export function formatNextPathnameInfo(info: ExtendedInfo) { let pathname = addLocale( info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix ) if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname) } if (info.buildId) { pathname = addPathSuffix( addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json' ) } pathname = addPathPrefix(pathname, info.basePath) return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname) } import type { OutgoingHttpHeaders } from 'http' /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname( parsed: { hostname?: string | null }, headers?: OutgoingHttpHeaders ): string | undefined { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname: string if (headers?.host && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0] } else if (parsed.hostname) { hostname = parsed.hostname } else return return hostname.toLowerCase() } export interface PathLocale { detectedLocale?: string pathname: string } /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap() /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath( pathname: string, locales?: readonly string[] ): PathLocale { // If locales is undefined, return the pathname as is. if (!locales) return { pathname } // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales) if (!lowercasedLocales) { lowercasedLocales = locales.map((locale) => locale.toLowerCase()) cache.set(locales, lowercasedLocales) } let detectedLocale: string | undefined // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2) // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname } // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase() // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment) if (index < 0) return { pathname } // Return the case-sensitive locale. detectedLocale = locales[index] // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/' return { pathname, detectedLocale } } import { pathHasPrefix } from './path-has-prefix' /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path: string, prefix: string): string { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length) // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return `/${withoutPrefix}` } [ import { normalizeLocalePath } from '../../i18n/normalize-locale-path' import { removePathPrefix } from './remove-path-prefix' import { pathHasPrefix } from './path-has-prefix' import type { I18NProvider } from '../../../../server/lib/i18n-provider' export interface NextPathnameInfo { /** * The base path in case the pathname included it. */ basePath?: string /** * The buildId for when the parsed URL is a data URL. Parsing it can be * disabled with the `parseData` option. */ buildId?: string /** * If there was a locale in the pathname, this will hold its value. */ locale?: string /** * The processed pathname without a base path, locale, or data URL elements * when parsing it is enabled. */ pathname: string /** * A boolean telling if the pathname had a trailingSlash. This can be only * true if trailingSlash is enabled. */ trailingSlash?: boolean } interface Options { /** * When passed to true, this function will also parse Nextjs data URLs. */ parseData?: boolean /** * A partial of the Next.js configuration to parse the URL. */ nextConfig?: { basePath?: string i18n?: { locales?: readonly string[] } | null trailingSlash?: boolean } /** * If provided, this normalizer will be used to detect the locale instead of * the default locale detection. */ i18nProvider?: I18NProvider } export function getNextPathnameInfo( pathname: string, options: Options ): NextPathnameInfo { const { basePath, i18n, trailingSlash } = options.nextConfig ?? {} const info: NextPathnameInfo = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash, } if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath) info.basePath = basePath } let pathnameNoDataPrefix = info.pathname if ( info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json') ) { const paths = info.pathname .replace(/^\/_next\/data\//, '') .replace(/\.json$/, '') .split('/') const buildId = paths[0] info.buildId = buildId pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/' // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales) info.locale = result.detectedLocale info.pathname = result.pathname ?? info.pathname if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales) if (result.detectedLocale) { info.locale = result.detectedLocale } } } return info } import { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'; import { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'; import { getHostname } from '../../shared/lib/get-hostname'; import { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'; const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); export class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.mapexport { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies'; //# sourceMappingURL=cookies.js.map import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { RemovedUAError, RemovedPageError } from '../error'; import { RequestCookies } from './cookies'; export const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ export class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (process.env.NEXT_RUNTIME !== 'edge') { if (init.body && init.duplex !== 'half') { init.duplex = 'half'; } } if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new RequestCookies(this.headers), nextUrl, url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.mapEexport class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map|import { stringifyCookie } from '../../web/spec-extension/cookies'; import { NextURL } from '../next-url'; import { toNodeOutgoingHttpHeaders, validateURL } from '../utils'; import { ReflectAdapter } from './adapters/reflect'; import { ResponseCookies } from './cookies'; const INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ export class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.mapG/** * The result of parsing a URL relative to a base URL. */ export type RelativeURL = { /** * The relative URL. Either a URL including the origin or a relative URL. */ url: string /** * Whether the URL is relative to the base URL. */ isRelative: boolean } export function parseRelativeURL( url: string | URL, base: string | URL ): RelativeURL { const baseURL = typeof base === 'string' ? new URL(base) : base const relative = new URL(url, base) // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative, } } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url: string | URL, base: string | URL): string { const relative = parseRelativeURL(url, base) return relative.url } export const RSC_HEADER = 'rsc' as const export const ACTION_HEADER = 'next-action' as const // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch' as const export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const export const NEXT_URL = 'next-url' as const export const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, ] as const export const NEXT_RSC_UNION_QUERY = '_rsc' as const export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const Bimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'; const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; export function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } export function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path: string) { return path.startsWith('/') ? path : `/${path}` } @import type { Segment } from '../../server/app-render/types' export function isGroupSegment(segment: string) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')') } export function isParallelRouteSegment(segment: string) { return segment.startsWith('@') && segment !== '@children' } export function addSearchParamsIfPageSegment( segment: Segment, searchParams: Record ) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY) if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams) return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY } return segment } export const PAGE_SEGMENT_KEY = '__PAGE__' export const DEFAULT_SEGMENT_KEY = '__DEFAULT__' import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash' import { isGroupSegment } from '../../segment' /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route: string) { return ensureLeadingSlash( route.split('/').reduce((pathname, segment, index, segments) => { // Empty segments are ignored. if (!segment) { return pathname } // Groups are ignored. if (isGroupSegment(segment)) { return pathname } // Parallel segments are ignored. if (segment[0] === '@') { return pathname } // The last segment (if it's a leaf) should be ignored. if ( (segment === 'page' || segment === 'route') && index === segments.length - 1 ) { return pathname } return `${pathname}/${segment}` }, '') ) } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url: string) { return url.replace( /\.rsc($|\?)/, // $1 ensures `?` is preserved '$1' ) } Jimport { ReflectAdapter } from './reflect'; /** * @internal */ export class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } export class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.mapconst sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; export function createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } export function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } export function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const workAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map$// Share the instance module in the next-shared layer import { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { workAsyncStorageInstance as workAsyncStorage }; //# sourceMappingURL=work-async-storage.external.js.mapimport { RequestCookies } from '../cookies'; import { ResponseCookies } from '../cookies'; import { ReflectAdapter } from './reflect'; import { workAsyncStorage } from '../../../app-render/work-async-storage.external'; /** * @internal */ export class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } export class RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); export function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } export function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } export class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorage.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } export function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } export function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } export function responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.mapY/** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user export const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set export const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); export { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, }; //# sourceMappingURL=constants.js.mapr/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable( promise: Promise | T ): promise is Promise { return ( promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function' ) } $import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'; import { isThenable } from '../../../shared/lib/is-thenable'; const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (process.env.NEXT_RUNTIME === 'edge') { api = require('@opentelemetry/api'); } else { try { api = require('@opentelemetry/api'); } catch (err) { api = require('next/dist/compiled/@opentelemetry/api'); } } const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; export class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } export function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); export { getTracer, SpanStatusCode, SpanKind }; //# sourceMappingURL=tracer.js.mapimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants'; import { getTracer } from '../lib/trace/tracer'; import { NodeSpan } from '../lib/trace/constants'; export function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ export function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ export function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } export function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } export const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; export const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; export const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; export const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); export const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); export function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = require('next/dist/compiled/cookie'); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ export class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ export function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ export function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils'; export class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id')); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax', secure: process.env.NODE_ENV !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.mapimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'; import { HeadersAdapter } from '../web/spec-extension/adapters/headers'; import { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies'; import { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'; import { DraftModeProvider } from './draft-mode-provider'; import { splitCookiesString } from '../web/utils'; function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } export function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } export function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } export function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const workUnitAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.map export class InvariantError extends Error { constructor(message: string, options?: ErrorOptions) { super( `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`, options ) this.name = 'InvariantError' } } // Share the instance module in the next-shared layer import { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; import { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'; import { InvariantError } from '../../shared/lib/invariant-error'; export { workUnitAsyncStorageInstance as workUnitAsyncStorage }; export function throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } export function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } export function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } export function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } export function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } export function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } export function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } export function getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map/** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ export class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.mapimport type { Timestamp } from '../cache-handlers/types' // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map() export const isStale = (tags: string[], timestamp: Timestamp) => { for (const tag of tags) { const revalidatedAt = tagsManifest.get(tag) if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true } } return false } */** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache' import type { CacheEntry, CacheHandlerV2 } from './types' import { isStale, tagsManifest, } from '../incremental-cache/tags-manifest.external' type PrivateCacheEntry = { entry: CacheEntry // For the default cache we store errored cache // entries and allow them to be used up to 3 times // after that we want to dispose it and try for fresh // If an entry is errored we return no entry // three times so that we retry hitting origin (MISS) // and then if it still fails to set after the third we // return the errored content and use expiration of // Math.min(30, entry.expiration) isErrored: boolean errorRetryCount: number // compute size on set since we need to read size // of the ReadableStream for LRU evicting size: number } // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache( 50 * 1024 * 1024, (entry) => entry.size ) const pendingSets = new Map>() const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined const DefaultCacheHandler: CacheHandlerV2 = { async get(cacheKey) { const pendingPromise = pendingSets.get(cacheKey) if (pendingPromise) { debug?.('get', cacheKey, 'pending') await pendingPromise } const privateEntry = memoryCache.get(cacheKey) if (!privateEntry) { debug?.('get', cacheKey, 'not found') return undefined } const entry = privateEntry.entry if ( performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000 ) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug?.('get', cacheKey, 'expired') return undefined } if (isStale(entry.tags, entry.timestamp)) { debug?.('get', cacheKey, 'had stale tag') return undefined } const [returnStream, newSaved] = entry.value.tee() entry.value = newSaved debug?.('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire, }) return { ...entry, value: returnStream, } }, async set(cacheKey, pendingEntry) { debug?.('set', cacheKey, 'start') let resolvePending: () => void = () => {} const pendingPromise = new Promise((resolve) => { resolvePending = resolve }) pendingSets.set(cacheKey, pendingPromise) const entry = await pendingEntry let size = 0 try { const [value, clonedValue] = entry.value.tee() entry.value = value const reader = clonedValue.getReader() for (let chunk; !(chunk = await reader.read()).done; ) { size += Buffer.from(chunk.value).byteLength } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size, }) debug?.('set', cacheKey, 'done') } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug?.('set', cacheKey, 'failed', err) } finally { resolvePending() pendingSets.delete(cacheKey) } }, async refreshTags() { // Nothing to do for an in-memory cache handler. }, async getExpiration(...tags) { const expiration = Math.max( ...tags.map((tag) => tagsManifest.get(tag) ?? 0) ) debug?.('getExpiration', { tags, expiration }) return expiration }, async expireTags(...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()) debug?.('expireTags', { tags, timestamp }) for (const tag of tags) { // TODO: update file-system-cache? tagsManifest.set(tag, timestamp) } }, } export default DefaultCacheHandler import DefaultCacheHandler from '../lib/cache-handlers/default.external'; const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ export function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { debug == null ? void 0 : debug('cache handlers already initialized'); return false; } debug == null ? void 0 : debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { debug == null ? void 0 : debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { debug == null ? void 0 : debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); debug == null ? void 0 : debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ export function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ export function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ export function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ export function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } debug == null ? void 0 : debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.mape import { getCacheHandlers } from './use-cache/handlers'; /** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } export async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.mapimport { createAsyncLocalStorage } from './async-local-storage'; export const afterTaskAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.map7// Share the instance module in the next-shared layer import { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { afterTaskAsyncStorage }; //# sourceMappingURL=after-task-async-storage.external.js.mapimport PromiseQueue from 'next/dist/compiled/p-queue'; import { InvariantError } from '../../shared/lib/invariant-error'; import { isThenable } from '../../shared/lib/is-thenable'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { withExecuteRevalidates } from '../revalidation-utils'; import { bindSnapshot } from '../app-render/async-local-storage'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new PromiseQueue(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorage.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorage.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = bindSnapshot(async ()=>{ try { await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map/** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ export function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } export function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.mapimport { AfterContext } from '../after/after-context'; import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { createLazyResult } from '../lib/lazy-result'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createSnapshot } from '../app-render/async-local-storage'; export function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map/** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ export function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } export function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } export class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.mapF/** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ export function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.mapRimport { createAsyncLocalStorage } from '../app-render/async-local-storage'; export function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ export function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'; import { getCacheHandlerEntries } from '../use-cache/handlers'; import { createLazyResult } from './lazy-result'; const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } export async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map/** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ export function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map Fimport { PageSignatureError } from './error'; import { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'; import { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event'; import { NextRequest } from './spec-extension/request'; import { NextResponse } from './spec-extension/response'; import { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url'; import { NextURL } from './next-url'; import { stripInternalSearchParams } from '../internal-utils'; import { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'; import { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers'; import { ensureInstrumentationRegistered } from './globals'; import { createRequestStoreForAPI } from '../async-storage/request-store'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { createWorkStore } from '../async-storage/work-store'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'; import { getTracer } from '../lib/trace/tracer'; import { MiddlewareSpan } from '../lib/trace/constants'; import { CloseController } from './web-on-close'; import { getEdgePreviewProps } from './get-edge-preview-props'; import { getBuiltinRequestContext } from '../after/builtin-request-context'; import { getImplicitTags } from '../lib/implicit-tags'; import { isRSCRequestHeader } from '../lib/is-rsc-request'; export class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm require('next/dist/experimental/testmode/server-edge'); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } export async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: process.env.NODE_ENV !== 'development', fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX, dev: process.env.NODE_ENV === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\/\//))) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map import parseua from 'next/dist/compiled/ua-parser-js'; export function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } export function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } export function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.mapconst GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; export { GlobalURLPattern as URLPattern }; //# sourceMappingURL=url-pattern.js.map)import { workAsyncStorage } from '../app-render/work-async-storage.external'; /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ export function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map;export * from './after'; //# sourceMappingURL=index.js.mapconst DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE' export class DynamicServerError extends Error { digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE constructor(public readonly description: string) { super(`Dynamic server usage: ${description}`) } } export function isDynamicServerError(err: unknown): err is DynamicServerError { if ( typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string' ) { return false } return err.digest === DYNAMIC_ERROR_CODE } const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT' export class StaticGenBailoutError extends Error { public readonly code = NEXT_STATIC_GEN_BAILOUT } export function isStaticGenBailoutError( error: unknown ): error is StaticGenBailoutError { if (typeof error !== 'object' || error === null || !('code' in error)) { return false } return error.code === NEXT_STATIC_GEN_BAILOUT }  export function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ export function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} export function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.mapAexport const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; export const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; export const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; export const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING' /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { public readonly digest = BAILOUT_TO_CSR constructor(public readonly reason: string) { super(`Bail out to client-side rendering: ${reason}`) } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err: unknown): err is BailoutToCSRError { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false } return err.digest === BAILOUT_TO_CSR } x/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ import type { WorkStore } from '../app-render/work-async-storage.external' import type { WorkUnitStore, RequestStore, PrerenderStoreLegacy, PrerenderStoreModern, PrerenderStoreModernRuntime, } from '../app-render/work-unit-async-storage.external' // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react' import { DynamicServerError } from '../../client/components/hooks-server-context' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { getRuntimeStagePromise, workUnitAsyncStorage, } from './work-unit-async-storage.external' import { workAsyncStorage } from '../app-render/work-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME, } from '../../lib/framework/boundary-constants' import { scheduleOnNextTick } from '../../lib/scheduler' import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr' import { InvariantError } from '../../shared/lib/invariant-error' const hasPostpone = typeof React.unstable_postpone === 'function' export type DynamicAccess = { /** * If debugging, this will contain the stack trace of where the dynamic access * occurred. This is used to provide more information to the user about why * their page is being rendered dynamically. */ stack?: string /** * The expression that was accessed dynamically. */ expression: string } // Stores dynamic reasons used during an RSC render. export type DynamicTrackingState = { /** * When true, stack information will also be tracked during dynamic access. */ readonly isDebugDynamicAccesses: boolean | undefined /** * The dynamic accesses that occurred during the render. */ readonly dynamicAccesses: Array syncDynamicErrorWithStack: null | Error } // Stores dynamic reasons used during an SSR render. export type DynamicValidationState = { hasSuspenseAboveBody: boolean hasDynamicMetadata: boolean hasDynamicViewport: boolean hasAllowedDynamic: boolean dynamicErrors: Array } export function createDynamicTrackingState( isDebugDynamicAccesses: boolean | undefined ): DynamicTrackingState { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null, } } export function createDynamicValidationState(): DynamicValidationState { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [], } } export function getFirstDynamicReason( trackingState: DynamicTrackingState ): undefined | string { return trackingState.dynamicAccesses[0]?.expression } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic( store: WorkStore, workUnitStore: undefined | Exclude, expression: string ): void { if (workUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender-legacy': case 'prerender-ppr': case 'request': break default: workUnitStore satisfies never } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return if (store.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'prerender-ppr': return postponeWithTracking( store.route, expression, workUnitStore.dynamicTracking ) case 'prerender-legacy': workUnitStore.revalidate = 0 // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration( expression: string, store: WorkStore, prerenderStore: PrerenderStoreLegacy ): never { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = new DynamicServerError( `Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error` ) prerenderStore.revalidate = 0 store.dynamicUsageDescription = expression store.dynamicUsageStack = err.stack throw err } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) { switch (workUnitStore.type) { case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return case 'private-cache': // A private cache scope is already dynamic by definition. return case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break case 'request': if (process.env.NODE_ENV !== 'production') { workUnitStore.usedDynamic = true } break default: workUnitStore satisfies never } } function abortOnSynchronousDynamicDataAccess( route: string, expression: string, prerenderStore: PrerenderStoreModern ): void { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` const error = createPrerenderInterruptedError(reason) prerenderStore.controller.abort(error) const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function abortOnSynchronousPlatformIOAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): void { const dynamicTracking = prerenderStore.dynamicTracking abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } export function trackSynchronousPlatformIOAccessInDev( requestStore: RequestStore ): void { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess( route: string, expression: string, errorWithStack: Error, prerenderStore: PrerenderStoreModern ): never { const prerenderSignal = prerenderStore.controller.signal if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack } } } throw createPrerenderInterruptedError( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.` ) } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack) } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev /** * This component will call `React.postpone` that throws the postponed error. */ type PostponeProps = { reason: string route: string } export function Postpone({ reason, route }: PostponeProps): never { const prerenderStore = workUnitAsyncStorage.getStore() const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null postponeWithTracking(route, reason, dynamicTracking) } export function postponeWithTracking( route: string, expression: string, dynamicTracking: null | DynamicTrackingState ): never { assertPostpone() if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } React.unstable_postpone(createPostponeReason(route, expression)) } function createPostponeReason(route: string, expression: string) { return ( `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error` ) } export function isDynamicPostpone(err: unknown) { if ( typeof err === 'object' && err !== null && typeof (err as any).message === 'string' ) { return isDynamicPostponeReason((err as any).message) } return false } function isDynamicPostponeReason(reason: string) { return ( reason.includes( 'needs to bail out of prerendering at this point because it used' ) && reason.includes( 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error' ) ) } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw new Error( 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js' ) } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED' function createPrerenderInterruptedError(message: string): Error { const error = new Error(message) ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED return error } type DigestError = Error & { digest: string } export function isPrerenderInterruptedError( error: unknown ): error is DigestError { return ( typeof error === 'object' && error !== null && (error as any).digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error ) } export function accessedDynamicData( dynamicAccesses: Array ): boolean { return dynamicAccesses.length > 0 } export function consumeDynamicAccess( serverDynamic: DynamicTrackingState, clientDynamic: DynamicTrackingState ): DynamicTrackingState['dynamicAccesses'] { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses) return serverDynamic.dynamicAccesses } export function formatDynamicAPIAccesses( dynamicAccesses: Array ): string[] { return dynamicAccesses .filter( (access): access is Required => typeof access.stack === 'string' && access.stack.length > 0 ) .map(({ expression, stack }) => { stack = stack .split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4) .filter((line) => { // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false } return true }) .join('\n') return `Dynamic API Usage Debug - ${expression}:\n${stack}` }) } function assertPostpone() { if (!hasPostpone) { throw new Error( `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js` ) } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal(): AbortSignal { const controller = new AbortController() controller.abort(new BailoutToCSRError('Render in Browser')) return controller.signal } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal( workUnitStore: WorkUnitStore ): AbortSignal | undefined { switch (workUnitStore.type) { case 'prerender': case 'prerender-runtime': const controller = new AbortController() if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(() => { controller.abort() }) } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore) if (runtimeStagePromise) { runtimeStagePromise.then(() => scheduleOnNextTick(() => controller.abort()) ) } else { scheduleOnNextTick(() => controller.abort()) } } return controller.signal case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined default: workUnitStore satisfies never } } export function annotateDynamicAccess( expression: string, prerenderStore: PrerenderStoreModern ) { const dynamicTracking = prerenderStore.dynamicTracking if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression, }) } } export function useDynamicRouteParams(expression: string) { const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore && workUnitStore) { switch (workUnitStore.type) { case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use( makeHangingPromise( workUnitStore.renderSignal, workStore.route, expression ) ) } break } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking( workStore.route, expression, workUnitStore.dynamicTracking ) } break } case 'prerender-runtime': throw new InvariantError( `\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'cache': case 'private-cache': throw new InvariantError( `\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.` ) case 'prerender-legacy': case 'request': case 'unstable-cache': break default: workUnitStore satisfies never } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/ // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6' // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp( `\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)` ) const hasMetadataRegex = new RegExp( `\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]` ) const hasViewportRegex = new RegExp( `\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]` ) const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`) export function trackAllowedDynamicAccess( workStore: WorkStore, componentStack: string, dynamicValidation: DynamicValidationState, clientDynamic: DynamicTrackingState ) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true return } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true return } else if ( hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test( componentStack ) ) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true dynamicValidation.hasSuspenseAboveBody = true return } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true return } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push( clientDynamic.syncDynamicErrorWithStack ) return } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense` const error = createErrorWithComponentOrOwnerStack(message, componentStack) dynamicValidation.dynamicErrors.push(error) return } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack( message: string, componentStack: string ) { const ownerStack = process.env.NODE_ENV !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null const error = new Error(message) error.stack = error.name + ': ' + message + (ownerStack ?? componentStack) return error } export enum PreludeState { Full = 0, Empty = 1, Errored = 2, } export function logDisallowedDynamicError( workStore: WorkStore, error: Error ): void { console.error(error) if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error( `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.` ) } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`) } } } export function throwIfDisallowedDynamic( workStore: WorkStore, prelude: PreludeState, dynamicValidation: DynamicValidationState, serverDynamic: DynamicTrackingState ): void { if (prelude !== PreludeState.Full) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError( workStore, serverDynamic.syncDynamicErrorWithStack ) throw new StaticGenBailoutError() } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors if (dynamicErrors.length > 0) { for (let i = 0; i < dynamicErrors.length; i++) { logDisallowedDynamicError(workStore, dynamicErrors[i]) } throw new StaticGenBailoutError() } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error( `Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport` ) throw new StaticGenBailoutError() } if (prelude === PreludeState.Empty) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error( `Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.` ) throw new StaticGenBailoutError() } } else { if ( dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata ) { console.error( `Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata` ) throw new StaticGenBailoutError() } } } export function delayUntilRuntimeStage( prerenderStore: PrerenderStoreModernRuntime, result: Promise ): Promise { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(() => result) } return result } ,import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external' import type { WorkStore } from '../app-render/work-async-storage.external' export function throwWithStaticGenerationBailoutError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwWithStaticGenerationBailoutErrorWithDynamicError( route: string, expression: string ): never { throw new StaticGenBailoutError( `Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } export function throwForSearchParamsAccessInUseCache( workStore: WorkStore, constructorOpt: Function ): never { const error = new Error( `Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, constructorOpt) workStore.invalidDynamicUsageError ??= error throw error } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore() return afterTaskStore?.rootTaskSpawnPhase === 'action' } ]import { workAsyncStorage } from '../app-render/work-async-storage.external' import { throwForMissingRequestStore, workUnitAsyncStorage, } from '../app-render/work-unit-async-storage.external' import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender, } from '../app-render/dynamic-rendering' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { makeHangingPromise, makeDevtoolsIOAwarePromise, } from '../dynamic-rendering-utils' import { isRequestAPICallableInsideAfter } from './utils' /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection(): Promise { const callingExpression = 'connection' const workStore = workAsyncStorage.getStore() const workUnitStore = workUnitAsyncStorage.getStore() if (workStore) { if ( workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter() ) { throw new Error( `Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after` ) } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined) } if (workStore.dynamicShouldError) { throw new StaticGenBailoutError( `Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering` ) } if (workUnitStore) { switch (workUnitStore.type) { case 'cache': { const error = new Error( `Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = new Error( `Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache` ) Error.captureStackTrace(error, connection) workStore.invalidDynamicUsageError ??= error throw error } case 'unstable-cache': throw new Error( `Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache` ) case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise( workUnitStore.renderSignal, workStore.route, '`connection()`' ) case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking( workStore.route, 'connection', workUnitStore.dynamicTracking ) case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration( 'connection', workStore, workUnitStore ) case 'request': trackDynamicDataInDynamicRender(workUnitStore) if (process.env.NODE_ENV === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined) } else { return Promise.resolve(undefined) } default: workUnitStore satisfies never } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression) } h// This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/ export function describeStringPropertyAccess(target: string, prop: string) { if (isDefinitelyAValidIdentifier.test(prop)) { return `\`${target}.${prop}\`` } return `\`${target}[${JSON.stringify(prop)}]\`` } export function describeHasCheckingStringProperty( target: string, prop: string ) { const stringifiedProp = JSON.stringify(prop) return `\`Reflect.has(${target}, ${stringifiedProp})\`, \`${stringifiedProp} in ${target}\`, or similar` } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule', ]) import { createAsyncLocalStorage } from './async-local-storage'; export const actionAsyncStorageInstance = createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.map.// Share the instance module in the next-shared layer import { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }; export { actionAsyncStorageInstance as actionAsyncStorage }; //# sourceMappingURL=action-async-storage.external.js.map, // 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'); 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 import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'; import { LRUCache } from '../../server/lib/lru-cache'; export const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } export function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } export function wait(...message) { prefixedLog('wait', ...message); } export function error(...message) { prefixedLog('error', ...message); } export function warn(...message) { prefixedLog('warn', ...message); } export function ready(...message) { prefixedLog('ready', ...message); } export function info(...message) { prefixedLog('info', ...message); } export function event(...message) { prefixedLog('event', ...message); } export function trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); export function warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map.import { InvariantError } from '../../shared/lib/invariant-error' import { postponeWithTracking, throwToInterruptStaticGeneration, } from '../app-render/dynamic-rendering' import { workAsyncStorage, type WorkStore, } from '../app-render/work-async-storage.external' import { workUnitAsyncStorage, type PrerenderStoreLegacy, type PrerenderStorePPR, type StaticPrerenderStore, } from '../app-render/work-unit-async-storage.external' import { makeHangingPromise } from '../dynamic-rendering-utils' import type { FallbackRouteParams } from './fallback-params' import type { Params, ParamValue } from './params' import { describeStringPropertyAccess, wellKnownProperties, } from '../../shared/lib/utils/reflect-utils' import { actionAsyncStorage } from '../app-render/action-async-storage.external' import { warnOnce } from '../../build/output/log' interface CacheLifetime {} const CachedParams = new WeakMap>() /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams(): Promise { warnOnce( '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.' ) const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError('Missing workStore in unstable_rootParams') } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.` ) } switch (workUnitStore.type) { case 'cache': case 'unstable-cache': { throw new Error( `Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams( workUnitStore.rootParams, workStore, workUnitStore ) case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams) default: return workUnitStore satisfies never } } function createPrerenderRootParams( underlyingParams: Params, workStore: WorkStore, prerenderStore: StaticPrerenderStore ): Promise { switch (prerenderStore.type) { case 'prerender-client': { const exportName = '`unstable_rootParams`' throw new InvariantError( `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.` ) } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const promise = makeHangingPromise( prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`' ) CachedParams.set(underlyingParams, promise) return promise } } } break } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams if (fallbackParams) { for (const key in underlyingParams) { if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams( underlyingParams, fallbackParams, workStore, prerenderStore ) } } } break } case 'prerender-legacy': break default: prerenderStore satisfies never } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams) } function makeErroringRootParams( underlyingParams: Params, fallbackParams: FallbackRouteParams, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy ): Promise { const cachedParams = CachedParams.get(underlyingParams) if (cachedParams) { return cachedParams } const augmentedUnderlying = { ...underlyingParams } // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying) CachedParams.set(underlyingParams, promise) Object.keys(underlyingParams).forEach((prop) => { if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get() { const expression = describeStringPropertyAccess( 'unstable_rootParams', prop ) // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } else { // Legacy Prerender throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } }, enumerable: true, }) } else { ;(promise as any)[prop] = underlyingParams[prop] } } }) return promise } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName: string): Promise { const apiName = `\`import('next/root-params').${paramName}()\`` const workStore = workAsyncStorage.getStore() if (!workStore) { throw new InvariantError(`Missing workStore in ${apiName}`) } const workUnitStore = workUnitAsyncStorage.getStore() if (!workUnitStore) { throw new Error( `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.` ) } const actionStore = actionAsyncStorage.getStore() if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw new Error( `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.` ) } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw new Error( `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.` ) } } switch (workUnitStore.type) { case 'unstable-cache': case 'cache': { throw new Error( `Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.` ) } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise( paramName, workStore, workUnitStore, apiName ) } case 'private-cache': case 'prerender-runtime': case 'request': { break } default: { workUnitStore satisfies never } } return Promise.resolve(workUnitStore.rootParams[paramName]) } function createPrerenderRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: StaticPrerenderStore, apiName: string ): Promise { switch (prerenderStore.type) { case 'prerender-client': { throw new InvariantError( `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.` ) } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams switch (prerenderStore.type) { case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeHangingPromise( prerenderStore.renderSignal, workStore.route, apiName ) } break } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if ( prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName) ) { return makeErroringRootParamPromise( paramName, workStore, prerenderStore, apiName ) } break } case 'prerender-legacy': { // legacy prerenders can't have fallback params break } default: { prerenderStore satisfies never } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]) } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise( paramName: string, workStore: WorkStore, prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy, apiName: string ): Promise { const expression = describeStringPropertyAccess(apiName, paramName) // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch (prerenderStore.type) { case 'prerender-ppr': { return postponeWithTracking( workStore.route, expression, prerenderStore.dynamicTracking ) } case 'prerender-legacy': { return throwToInterruptStaticGeneration( expression, workStore, prerenderStore ) } default: { prerenderStore satisfies never } } } M// Alias index file of next/server for edge runtime for tree-shaking purpose export { ImageResponse } from '../spec-extension/image-response'; export { NextRequest } from '../spec-extension/request'; export { NextResponse } from '../spec-extension/response'; export { userAgent, userAgentFromString } from '../spec-extension/user-agent'; export { URLPattern } from '../spec-extension/url-pattern'; export { after } from '../../after'; export { connection } from '../../request/connection'; export { unstable_rootParams } from '../../request/root-params'; //# sourceMappingURL=index.js.mapPexport * from '../server/web/exports/index'; //# sourceMappingURL=server.js.mapLimport { NextResponse } from "next/server"; const WINDOW_MS = 60_000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter(t => now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401, } const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)) export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK' export type HTTPAccessFallbackError = Error & { digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}` } /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError( error: unknown ): error is HTTPAccessFallbackError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const [prefix, httpStatus] = error.digest.split(';') return ( prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)) ) } export function getAccessFallbackHTTPStatus( error: HTTPAccessFallbackError ): number { const httpStatus = error.digest.split(';')[1] return Number(httpStatus) } export function getAccessFallbackErrorTypeByStatus( status: number ): 'not-found' | 'forbidden' | 'unauthorized' | undefined { switch (status) { case 401: return 'unauthorized' case 403: return 'forbidden' case 404: return 'not-found' default: return } } kexport enum RedirectStatusCode { SeeOther = 303, TemporaryRedirect = 307, PermanentRedirect = 308, } import { RedirectStatusCode } from './redirect-status-code' export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT' export enum RedirectType { push = 'push', replace = 'replace', } export type RedirectError = Error & { digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};` } /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error: unknown): error is RedirectError { if ( typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string' ) { return false } const digest = error.digest.split(';') const [errorCode, type] = digest const destination = digest.slice(2, -2).join(';') const status = digest.at(-2) const statusCode = Number(status) return ( errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode ) } "import { isHTTPAccessFallbackError, type HTTPAccessFallbackError, } from './http-access-fallback/http-access-fallback' import { isRedirectError, type RedirectError } from './redirect-error' /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError( error: unknown ): error is RedirectError | HTTPAccessFallbackError { return isRedirectError(error) || isHTTPAccessFallbackError(error) } import "next/dist/server/web/globals"; import { adapter } from "next/dist/server/web/adapter"; // Import the userland code. import * as _mod from "private-next-root-dir/src/middleware.js"; import { edgeInstrumentationOnRequestError } from "next/dist/server/web/globals"; import { isNextRouterError } from "next/dist/client/components/is-next-router-error"; const mod = { ..._mod }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (process.env.NODE_ENV !== 'production') { if (isNextRouterError(err)) { err.message = `Next.js navigation API is not allowed to be used in Middleware.`; throw err; } } const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } export default function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map @detectDomainLocaledomainItemshostnamedetectedLocaletoLowerCaseitemdomainHostnamedomainsplitdefaultLocalelocalessomelocaleremoveTrailingSlashroutereplaceparsePathpathhashIndexindexOfqueryIndexhasQuerypathnamesubstringqueryundefinedsliceaddPathPrefixprefixstartsWithaddPathSuffixsuffixpathHasPrefixaddLocaleignorePrefixlowerformatNextPathnameInfoinfobuildIdtrailingSlashbasePathendsWithgetHostnameparsedheadershostArrayisArraytoStringcacheWeakMapnormalizeLocalePathlowercasedLocalesgetsetsegmentssegmentindexlengthremovePathPrefixwithoutPrefixgetNextPathnameInfooptionsi18nnextConfigpathnameNoDataPrefixpathsjoinparseDataresulti18nProvideranalyzeparseRelativeURLurlbasebaseURLURLrelativeisRelativeorigingetRelativeURLRSC_HEADERACTION_HEADERNEXT_ROUTER_STATE_TREE_HEADERNEXT_ROUTER_PREFETCH_HEADERNEXT_ROUTER_SEGMENT_PREFETCH_HEADERNEXT_HMR_REFRESH_HEADERNEXT_HMR_REFRESH_HASH_COOKIENEXT_URLRSC_CONTENT_TYPE_HEADERFLIGHT_HEADERSNEXT_RSC_UNION_QUERYNEXT_ROUTER_STALE_TIME_HEADERNEXT_DID_POSTPONE_HEADERNEXT_REWRITTEN_PATH_HEADERNEXT_REWRITTEN_QUERY_HEADERNEXT_IS_PRERENDER_HEADERNEXT_ACTION_NOT_FOUND_HEADERensureLeadingSlashisGroupSegmentisParallelRouteSegmentaddSearchParamsIfPageSegmentsearchParamsisPageSegmentincludesPAGE_SEGMENT_KEYstringifiedQueryJSONstringifyDEFAULT_SEGMENT_KEYnormalizeAppPathreducenormalizeRscURLisThenablepromisethenInvariantErrorErrorconstructormessagenametagsManifestMapisStaletagstimestamptagrevalidatedAtLRUCachememoryCacheentrypendingSetsdebugprocessenvNEXT_PRIVATE_DEBUG_CACHEconsolebindDefaultCacheHandlercacheKeypendingPromiseprivateEntryperformancetimeOriginnowrevalidatereturnStreamnewSavedvalueteeexpirependingEntryresolvePendingPromiseresolveclonedValuereadergetReaderchunkreaddoneBufferfrombyteLengthisErrorederrorRetryCounterrdeleterefreshTagsgetExpirationexpirationMathmaxexpireTagsroundDYNAMIC_ERROR_CODEDynamicServerErrordescriptiondigestisDynamicServerErrorNEXT_STATIC_GEN_BAILOUTStaticGenBailoutErrorcodeisStaticGenBailoutErrorerrorBAILOUT_TO_CSRBailoutToCSRErrorreasonisBailoutToCSRErrorReactgetRuntimeStagePromiseworkUnitAsyncStorageworkAsyncStoragemakeHangingPromiseMETADATA_BOUNDARY_NAMEVIEWPORT_BOUNDARY_NAMEOUTLET_BOUNDARY_NAMEROOT_LAYOUT_BOUNDARY_NAMEscheduleOnNextTickhasPostponeunstable_postponecreateDynamicTrackingStateisDebugDynamicAccessesdynamicAccessessyncDynamicErrorWithStackcreateDynamicValidationStatehasSuspenseAboveBodyhasDynamicMetadatahasDynamicViewporthasAllowedDynamicdynamicErrorsgetFirstDynamicReasontrackingStateexpressionmarkCurrentScopeAsDynamicstoreworkUnitStoretypeforceDynamicforceStaticdynamicShouldErrorpostponeWithTrackingdynamicTrackingdynamicUsageDescriptiondynamicUsageStackstackNODE_ENVusedDynamicthrowToInterruptStaticGenerationprerenderStoretrackDynamicDataInDynamicRenderabortOnSynchronousDynamicDataAccesscreatePrerenderInterruptedErrorcontrollerabortpushabortOnSynchronousPlatformIOAccesserrorWithStacktrackSynchronousPlatformIOAccessInDevrequestStoreprerenderPhaseabortAndThrowOnSynchronousRequestDataAccessprerenderSignalsignalabortedwarnOnSyncDynamicErrortrackSynchronousRequestDataAccessInDevPostponegetStoreassertPostponecreatePostponeReasonisDynamicPostponeisDynamicPostponeReasonNEXT_PRERENDER_INTERRUPTEDisPrerenderInterruptedErroraccessedDynamicDataconsumeDynamicAccessserverDynamicclientDynamicformatDynamicAPIAccessesfilteraccesslinecreateRenderInBrowserAbortSignalAbortControllercreateHangingInputAbortSignalcacheSignalinputReadyruntimeStagePromiseannotateDynamicAccessuseDynamicRouteParamsworkStorefallbackParamsfallbackRouteParamsuserenderSignalhasSuspenseRegexbodyAndImplicitTagshasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegexRegExphasMetadataRegexhasViewportRegexhasOutletRegextrackAllowedDynamicAccesscomponentStackdynamicValidationtestcreateErrorWithComponentOrOwnerStackownerStackcaptureOwnerStackPreludeStatelogDisallowedDynamicErrordevhasReadableErrorStacksthrowIfDisallowedDynamicpreludeidelayUntilRuntimeStageafterTaskAsyncStoragethrowWithStaticGenerationBailoutErrorthrowWithStaticGenerationBailoutErrorWithDynamicErrorthrowForSearchParamsAccessInUseCacheconstructorOptcaptureStackTraceinvalidDynamicUsageErrorisRequestAPICallableInsideAfterafterTaskStorerootTaskSpawnPhasethrowForMissingRequestStoremakeDevtoolsIOAwarePromiseconnectioncallingExpressionphaseisDefinitelyAValidIdentifierdescribeStringPropertyAccesstargetpropdescribeHasCheckingStringPropertystringifiedPropwellKnownPropertiesSetactionAsyncStoragewarnOnceCachedParamsunstable_rootParamscreatePrerenderRootParamsrootParamsunderlyingParamsexportNamekeyhascachedParamsmakeErroringRootParamsaugmentedUnderlyingObjectkeysforEachdefinePropertyenumerablegetRootParamparamNameapiNameactionStoreisAppRouteisActioncreatePrerenderRootParamPromisemakeErroringRootParamPromiseNextResponseWINDOW_MSMAX_PER_WINDOWhitsgetClientIprequesttrimcheckRateLimitLocalwindowMsDatetimestampstallowedremainingresetceilmiddlewarenextUrlnextipuseRedisREDIS_URLCOSMIC_REDIS_ENABLEDstatusStringresponseconfigmatcherHTTPAccessErrorStatusNOT_FOUNDFORBIDDENUNAUTHORIZEDALLOWED_CODESvaluesHTTP_ERROR_FALLBACK_ERROR_CODEisHTTPAccessFallbackErrorhttpStatusNumbergetAccessFallbackHTTPStatusgetAccessFallbackErrorTypeByStatusRedirectStatusCodeREDIRECT_ERROR_CODERedirectTypeisRedirectErrorerrorCodedestinationatstatusCodeisNaNisNextRouterError@5_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js  ReplaceSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware06undefined924930undefined15491555undefined32863320falseundefined33233345{}undefined34343439__webpack_require__.gundefined35433548__webpack_require__.gundefined35713576__webpack_require__.gundefined6 ;// ./node_modules/next/dist/esm/server/web/error.js |webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware06undefined352358undefined582588undefined3 ;// ./node_modules/next/dist/esm/lib/constants.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middleware06undefined6066undefined128134undefined203209undefined250256undefined305311undefined358364undefined427433undefined524530undefined576582undefined628634undefined678684undefined712718undefined752758undefined793799undefined834840undefined875881undefined934940undefined10111017undefined10961102undefined12211227undefined12661272undefined13121318undefined13641370undefined14291435undefined17081714undefined17891795undefined18381844undefined18801879(/* unused pure expression or super */ null && (undefined19131912))undefined19631969undefined21682174undefined22212227undefined22712277undefined23262332undefined23792385undefined24852491undefined25622568undefined26372643undefined27102716undefined27992805undefined28802886undefined29692975undefined30153014(/* unused pure expression or super */ null && (undefined31903189))undefined31923198undefined32383237(/* unused pure expression or super */ null && (undefined33393338))undefined33413347undefined33933392(/* unused pure expression or super */ null && (undefined34823481))undefined34843490undefined35253524(/* unused pure expression or super */ null && (undefined36453644))undefined36473653undefined37053704(/* unused pure expression or super */ null && (undefined38103809))undefined38123818undefined38533852(/* unused pure expression or super */ null && (undefined39743973))undefined39763982undefined41074113undefined42434249undefined42914290(/* unused pure expression or super */ null && (undefined43964395))undefined43984404undefined44414440(/* unused pure expression or super */ null && (undefined45954594))undefined45974603undefined46344633(/* unused pure expression or super */ null && (undefined48454844))undefined48474853undefined48884887(/* unused pure expression or super */ null && (undefined50425041))undefined50445050undefined50795078(/* unused pure expression or super */ null && (undefined51455144))undefined51475153undefined83288379undefined6 ;// ./node_modules/next/dist/esm/server/web/utils.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware094undefined447453undefined16891695undefined39423948undefined47104716undefined52955301undefined53735395__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f51554552595f504152414d5f505245464958225d_directImport_asiSafe1__._undefined54065436__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f494e54455243455054494f4e5f4d41524b45525f505245464958225d_directImport_asiSafe1__._undefineda52435352NEXT_QUERY_PARAM_PREFIXundefined53635488NEXT_INTERCEPTION_MARKER_PREFIXundefinedRawSourceK ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware045undefined14491455undefined16321638undefined21252142__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined25292546__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefinedO20652164PageSignatureErrorundefined25512650PageSignatureErrorundefinedRawSourceJ ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js ReplaceSourceSourceMapSourceexport function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,AAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAAA,AAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0],"file":"x"}false06undefinedS ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js L/** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ export function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map \{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0],"file":"x"}false191197undefinedH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js I/** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ export function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAAA,CAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0],"file":"x"}false207213undefinedM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js import { parsePath } from './parse-path'; /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ export function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;CAGC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined164170undefined319327__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!271357parsePathundefinedRawSourceM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js import { parsePath } from './parse-path'; /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ export function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;CAIC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP,UAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0],"file":"x"}false040undefined222228undefined377385__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!329415parsePathundefinedRawSourceM ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js Simport { parsePath } from './parse-path'; /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ export function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAc;AAExC;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,GAAGJ,UAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0],"file":"x"}false040undefined328334undefined463471__WEBPACK_MODULE_REFERENCE__7_5b22706172736550617468225d_call_directImport_asiSafe1__._undefined!415501parsePathundefinedRawSourceH ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js import { addPathPrefix } from './add-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ export function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AAEjD;;;;CAIC,GACD,OAAO,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,IAAIL,cAAcM,OAAO,SAAS,OAAOJ;QACzC,IAAIF,cAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,OAAOH,cAAcG,MAAO,MAAGC;AACjC","ignoreList":[0],"file":"x"}zfalse049undefined51100undefined337343undefined767779__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined822834__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined944956__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined_660755pathHasPrefixundefined798893pathHasPrefixundefined10031097addPathPrefixundefinedRawSourceW ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js import { removeTrailingSlash } from './remove-trailing-slash'; import { addPathPrefix } from './add-path-prefix'; import { addPathSuffix } from './add-path-suffix'; import { addLocale } from './add-locale'; export function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map /{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;AAOxC,OAAO,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,WAAWH,UACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,WAAWN,oBAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,WAAWJ,cACTD,cAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,WAAWL,cAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,OACjBZ,cAAcI,UAAU,OACxBA,WACFN,oBAAoBM;AAC1B","ignoreList":[0],"file":"x"}_false061undefined63112undefined114163undefined165205undefined207213undefined273281__WEBPACK_MODULE_REFERENCE__11_5b226164644c6f63616c65225d_call_directImport_asiSafe1__._undefined444462__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined524536__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined538550__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined664676__WEBPACK_MODULE_REFERENCE__8_5b2261646450617468507265666978225d_call_directImport_asiSafe1__._undefined779791__WEBPACK_MODULE_REFERENCE__9_5b2261646450617468537566666978225d_call_directImport_asiSafe1__._undefined821839__WEBPACK_MODULE_REFERENCE__6_5b2272656d6f7665547261696c696e67536c617368225d_call_directImport_asiSafe1__._undefined63150addLocaleundefined313419removeTrailingSlashundefined481575addPathSuffixundefined577671addPathPrefixundefined785879addPathPrefixundefined9821076addPathSuffixundefined11061212removeTrailingSlashundefinedRawSource= ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ export function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAAA,AAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0],"file":"x"}false274280undefinedK ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ export function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map  {"version":3,"sources":["webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":"AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAElB;;;;;;;;CAQC,GACD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0],"file":"x"}false540546undefinedP ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js 6import { pathHasPrefix } from './path-has-prefix'; /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ export function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":"AAAA,SAASA,aAAa,QAAQ,oBAAmB;AAEjD;;;;;;;CAOC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,CAACH,cAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAQ,MAAGA;AACb","ignoreList":[0],"file":"x"}false049undefined360366undefined796808__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined%739834pathHasPrefixundefinedRawSourceT ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js nimport { normalizeLocalePath } from '../../i18n/normalize-locale-path'; import { removePathPrefix } from './remove-path-prefix'; import { pathHasPrefix } from './path-has-prefix'; export function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map _{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aAAa,QAAQ,oBAAmB;AAkDjD,OAAO,SAASC,oBACdC,QAAgB,EAChBC,OAAgB;QAE0BA;IAA1C,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,CAAAA,sBAAAA,QAAQI,UAAAA,AAAU,KAAA,OAAlBJ,sBAAsB,CAAC;IACjE,MAAMK,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAAMA,SAASO,QAAQ,CAAC,OAAOH;IAC7D;IAEA,IAAIF,YAAYJ,cAAcQ,KAAKN,QAAQ,EAAEE,WAAW;QACtDI,KAAKN,QAAQ,GAAGH,iBAAiBS,KAAKN,QAAQ,EAAEE;QAChDI,KAAKJ,QAAQ,GAAGA;IAClB;IACA,IAAIM,uBAAuBF,KAAKN,QAAQ;IAExC,IACEM,KAAKN,QAAQ,CAACS,UAAU,CAAC,mBACzBH,KAAKN,QAAQ,CAACO,QAAQ,CAAC,UACvB;QACA,MAAMG,QAAQJ,KAAKN,QAAQ,CACxBW,OAAO,CAAC,oBAAoB,IAC5BA,OAAO,CAAC,WAAW,IACnBC,KAAK,CAAC;QAET,MAAMC,UAAUH,KAAK,CAAC,EAAE;QACxBJ,KAAKO,OAAO,GAAGA;QACfL,uBACEE,KAAK,CAAC,EAAE,KAAK,UAAW,MAAGA,MAAMI,KAAK,CAAC,GAAGC,IAAI,CAAC,OAAS;QAE1D,sDAAsD;QACtD,kDAAkD;QAClD,IAAId,QAAQe,SAAS,KAAK,MAAM;YAC9BV,KAAKN,QAAQ,GAAGQ;QAClB;IACF;IAEA,4EAA4E;IAC5E,yBAAyB;IACzB,IAAIL,MAAM;QACR,IAAIc,SAAShB,QAAQiB,YAAY,GAC7BjB,QAAQiB,YAAY,CAACC,OAAO,CAACb,KAAKN,QAAQ,IAC1CJ,oBAAoBU,KAAKN,QAAQ,EAAEG,KAAKiB,OAAO;QAEnDd,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACnBL;QAAhBX,KAAKN,QAAQ,GAAGiB,CAAAA,mBAAAA,OAAOjB,QAAAA,AAAQ,KAAA,OAAfiB,mBAAmBX,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,wBAC7BZ,oBAAoBY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0],"file":"x"}false070undefined72127undefined129178undefined180186undefined536548__WEBPACK_MODULE_REFERENCE__10_5b2270617468486173507265666978225d_call_directImport_asiSafe1__._undefined602617__WEBPACK_MODULE_REFERENCE__15_5b2272656d6f766550617468507265666978225d_call_directImport_asiSafe1__._undefined15261544__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined19071925__WEBPACK_MODULE_REFERENCE__14_5b226e6f726d616c697a654c6f63616c6550617468225d_call_directImport_asiSafe1__._undefined352447pathHasPrefixundefined501602removePathPrefixundefined15111618normalizeLocalePathundefined19812088normalizeLocalePathundefinedRawSource9 ;// ./node_modules/next/dist/esm/server/web/next-url.js twebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware079undefined81177undefined179238undefined240330undefined683689undefined14441462__WEBPACK_MODULE_REFERENCE__16_5b226765744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined15781623undefinedundefined17251735__WEBPACK_MODULE_REFERENCE__13_5b22676574486f73746e616d65225d_call_directImport_asiSafe1__._undefined19331950__WEBPACK_MODULE_REFERENCE__5_5b22646574656374446f6d61696e4c6f63616c65225d_call_directImport_asiSafe1__._undefined29853006__WEBPACK_MODULE_REFERENCE__12_5b22666f726d61744e657874506174686e616d65496e666f225d_call_directImport_asiSafe1__._undefined11091216getNextPathnameInfoundefined14421533getHostnameundefined17311835detectDomainLocaleundefined28702983formatNextPathnameInfoundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js qqwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware0107undefinedrG ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js owebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware037undefined39104undefined106165undefined167209undefined211217undefined520526undefined699709__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined9661000falseundefined10031120{}undefined12391245__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined12751299__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined14211434__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined14891534 falseundefined153815400undefined26402655__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f766564506167654572726f72225d_directImport_asiSafe1__._undefined28672880__WEBPACK_MODULE_REFERENCE__1_5b2252656d6f76656455414572726f72225d_directImport_asiSafe1__._undefined478568validateURLundefined9521030NextURLundefined10601178toNodeOutgoingHttpHeadersundefined13001392_edge_runtime_cookies.RequestCookiesundefined25562651RemovedPageErrorundefined28632954RemovedUAErrorundefinedRawSourceP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js lxwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware06undefinedmH ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js j8webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware066undefined68105undefined107172undefined174225undefined227270undefined14041410undefined15761590__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined20832097__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined22072221__WEBPACK_MODULE_REFERENCE__19_5b22737472696e67696679436f6f6b6965225d_call_directImport_asiSafe1__._undefined25152528__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined26982704__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined27432767__WEBPACK_MODULE_REFERENCE__3_5b22746f4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined41864196__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined44864496__WEBPACK_MODULE_REFERENCE__3_5b2276616c696461746555524c225d_call_directImport_asiSafe1__._undefined1119response_INTERNALSundefined13021396_edge_runtime_cookies.ResponseCookiesundefined18891983_edge_runtime_cookies.ResponseCookiesundefined20932192(0,_edge_runtime_cookies.stringifyCookie)undefined24862570ReflectAdapterundefined26582666response_INTERNALSundefined27402818NextURLundefined28572975toNodeOutgoingHttpHeadersundefined36003608response_INTERNALSundefined43944484validateURLundefined47744864validateURLundefinedRawSourceL ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js S/** * The result of parsing a URL relative to a base URL. */ export function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ export function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map D{"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD,OAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0],"file":"x"}!false6369undefined687693undefinedfJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js export const RSC_HEADER = 'rsc'; export const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; export const NEXT_URL = 'next-url'; export const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; export const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; export const NEXT_RSC_UNION_QUERY = '_rsc'; export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map  {"version":3,"sources":["webpack://../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC","ignoreList":[0],"file":"x"} false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefinedG787814app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEundefinedRawSource; ;// ./node_modules/next/dist/esm/server/internal-utils.js ^rwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middleware078undefined115134__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined139145undefined267273undefined453472__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefinedN36140NEXT_RSC_UNION_QUERYundefined445549NEXT_RSC_UNION_QUERYundefinedRawSourceO ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js 2/** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ export function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ={"version":3,"sources":["webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAQ,MAAGA;AAC3C","ignoreList":[0],"file":"x"}false159165undefinedZ8 ;// ./node_modules/next/dist/esm/shared/lib/segment.js export function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } export function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } export function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } export const PAGE_SEGMENT_KEY = '__PAGE__'; export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":"AAEA,OAAO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEA,OAAO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEA,OAAO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMQ,mBAAmB,WAAU;AAC1C,OAAO,MAAMI,sBAAsB,cAAa","ignoreList":[0],"file":"x"}Lfalse06undefined143149undefined258264undefined611617undefined655661undefinedVG ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'; import { isGroupSegment } from '../../segment'; /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ export function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ export function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map  {"version":3,"sources":["webpack://../../../../../src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","normalizeRscURL","url","replace"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;AAE9C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,iBAAiBC,KAAa;IAC5C,OAAOH,mBACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAIL,eAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAA,CAAM,IACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACD,OAAO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0],"file":"x"}+false073undefined75121undefined747753undefined800817__WEBPACK_MODULE_REFERENCE__26_5b22656e737572654c656164696e67536c617368225d_call_directImport_asiSafe1__._undefined10281041__WEBPACK_MODULE_REFERENCE__27_5b22697347726f75705365676d656e74225d_call_directImport_asiSafe1__._undefined16091615undefinedH672777ensureLeadingSlashundefined9881085isGroupSegmentundefinedRawSourceP ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js N)webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middleware042undefined6571undefined331337undefined955968__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined16061619__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined17941807__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined23302343__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined24942507__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined31143127__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined32643277__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined39013914__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined44684481__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined898982ReflectAdapterundefined16201704ReflectAdapterundefined18791963ReflectAdapterundefined24862570ReflectAdapterundefined27212805ReflectAdapterundefined34123496ReflectAdapterundefined36333717ReflectAdapterundefined43414425ReflectAdapterundefined49795063ReflectAdapterundefinedRawSourceK ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js Kwebpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|shared876882undefined10591065undefined12391245undefinedC885907async_local_storage_createAsyncLocalStorageundefinedRawSourceS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js H webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared063undefined6571undefined105127__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB34149async_local_storage_createAsyncLocalStorageundefinedRawSourceS ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js E>webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared54177undefined179234undefinedFX ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js Cwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware043undefined4589undefined91133undefined135217undefined240246undefined566572undefined969982__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined11371143undefined13691375undefined21182124undefined22422256__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined25832598__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined30263040__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined47344747__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined48614867undefined56735686__WEBPACK_MODULE_REFERENCE__21_5b225265666c65637441646170746572225d_call_asiSafe1__._undefined57785784undefined63646370undefinedm350370request_cookies_RequestCookiesAdapterundefined740824ReflectAdapterundefined20632157_edge_runtime_cookies.ResponseCookiesundefined24842572workAsyncStorageInstanceundefined30003094_edge_runtime_cookies.ResponseCookiesundefined47884872ReflectAdapterundefined57915875ReflectAdapterundefined65556585request_cookies_responseCookiesToRequestCookiesundefinedRawSource@ ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js @webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middleware63946400undefined70877093undefined72607473undefinedO54795486constants_NodeSpanundefined55965603constants_NodeSpanundefinedRawSource< ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js O/** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ export function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0],"file":"x"}false136142undefined<= ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js 9webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware072undefined74134undefined674708trueundefined723729__webpack_require__undefined731750817undefined761908{}undefined9951001undefined11391145undefined36493672__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined48114826__WEBPACK_MODULE_REFERENCE__34_5b224c6f675370616e416c6c6f774c697374225d_call_asiSafe1__._undefined62146223__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined73247347__WEBPACK_MODULE_REFERENCE__34_5b224e65787456616e696c6c615370616e416c6c6f776c697374225d_call_asiSafe1__._undefined93189364undefined33193423NextVanillaSpanAllowlistundefined45624650LogSpanAllowListundefined60386127isThenableundefined72287332NextVanillaSpanAllowlistundefined92149222tracer_getTracerundefinedRawSource< ;// ./node_modules/next/dist/esm/server/api-utils/index.js }6webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middleware071undefined73182undefined184231undefined233282undefined284290undefined703709undefined930936undefined16151621undefined16981711__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined17701796__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f484541444552225d_directImport_asiSafe1__._undefined19271968__WEBPACK_MODULE_REFERENCE__2_5b2250524552454e4445525f524556414c49444154455f4f4e4c595f47454e4552415445445f484541444552225d_directImport_asiSafe1__._undefined20562062undefined21222128undefined21872193undefined22252224(/* unused pure expression or super */ null && (undefined22402239))undefined22422248undefined23132319undefined23892395undefined25362542__webpack_require__undefined25442570663undefined31363173 trueundefined318631900undefined32133232"production"undefined37533790 trueundefined380338070undefined38303849"production"undefined41794185undefined44554461undefined47754781undefined13901474HeadersAdapterundefined15331650PRERENDER_REVALIDATE_HEADERundefined17811928PRERENDER_REVALIDATE_ONLY_GENERATED_HEADERundefinedRawSourceN ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js z3Vwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware086undefined8894undefined406430__WEBPACK_MODULE_REFERENCE__37_5b22636865636b49734f6e44656d616e64526576616c6964617465225d_call_directImport_asiSafe1__._undefined529556__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined860896 falseundefined9019470undefined15331560__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined16531690 trueundefined170317070undefined17301749"production"undefined21212148__WEBPACK_MODULE_REFERENCE__37_5b22434f4f4b49455f4e414d455f50524552454e4445525f425950415353225d_directImport_asiSafe1__._undefined22242261 trueundefined227422780undefined23012320"production"undefined312431checkIsOnDemandRevalidateundefined530650COOKIE_NAME_PRERENDER_BYPASSundefined15501670COOKIE_NAME_PRERENDER_BYPASSundefined21862306COOKIE_NAME_PRERENDER_BYPASSundefinedRawSourceH ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js w0webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middleware075undefined77148undefined150336undefined338417undefined419476undefined478527undefined580593__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined635648__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined701714__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined812825__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined827840__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined869896__WEBPACK_MODULE_REFERENCE__33_5b224d757461626c6552657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined14781495__WEBPACK_MODULE_REFERENCE__3_5b2273706c6974436f6f6b696573537472696e67225d_call_directImport_asiSafe1__._undefined16191633__WEBPACK_MODULE_REFERENCE__19_5b22526573706f6e7365436f6f6b696573225d_directImport_asiSafe1__._undefined18351841undefined22822288undefined39273940__WEBPACK_MODULE_REFERENCE__19_5b2252657175657374436f6f6b696573225d_directImport_asiSafe1__._undefined39423955__WEBPACK_MODULE_REFERENCE__29_5b224865616465727341646170746572225d_call_asiSafe1__._undefined42024222__WEBPACK_MODULE_REFERENCE__33_5b2252657175657374436f6f6b69657341646170746572225d_call_asiSafe1__._undefined49084942__WEBPACK_MODULE_REFERENCE__33_5b22637265617465436f6f6b696573576974684d757461626c65416363657373436865636b225d_call_directImport_asiSafe1__._undefined52005216__WEBPACK_MODULE_REFERENCE__38_5b2244726166744d6f646550726f7669646572225d_directImport_asiSafe1__._undefined55545560undefined57141HeadersAdapterundefined183275FLIGHT_HEADERSundefined328412HeadersAdapterundefined510602_edge_runtime_cookies.RequestCookiesundefined604688HeadersAdapterundefined717829MutableRequestCookiesAdapterundefined14111515splitCookiesStringundefined16391733_edge_runtime_cookies.ResponseCookiesundefined40134105_edge_runtime_cookies.RequestCookiesundefined41074191HeadersAdapterundefined44384536request_cookies_RequestCookiesAdapterundefined52225361createCookiesWithMutableAccessCheckundefined56195717DraftModeProviderundefinedRawSourceX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js t-webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|shared063undefined6571undefined109131__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB38153async_local_storage_createAsyncLocalStorageundefinedRawSourceJ ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js q~ false06undefined3339undefined293299undefined364370undefined681687undefined764770undefined823829undefined896902undefined932938undefined991997undefined11791185undefined12231229undefined12911297undefined13531359undefined14221428undefined14931499undefined15551561undefined615app_router_headers_RSC_HEADERundefined3244app_router_headers_ACTION_HEADERundefined285313app_router_headers_NEXT_ROUTER_STATE_TREE_HEADERundefined349375app_router_headers_NEXT_ROUTER_PREFETCH_HEADERundefined659693app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERundefined735757app_router_headers_NEXT_HMR_REFRESH_HEADERundefined787814components_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIEundefined853860app_router_headers_NEXT_URLundefined882904app_router_headers_RSC_CONTENT_TYPE_HEADERundefined934947app_router_headers_FLIGHT_HEADERSundefined957966app_router_headers_RSC_HEADERundefined9731001app_router_headers_NEXT_ROUTER_STATE_TREE_HEADERundefined10081034app_router_headers_NEXT_ROUTER_PREFETCH_HEADERundefined10411063app_router_headers_NEXT_HMR_REFRESH_HEADERundefined10701104app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADERundefined11151134app_router_headers_NEXT_RSC_UNION_QUERYundefined11521180app_router_headers_NEXT_ROUTER_STALE_TIME_HEADERundefined12131236app_router_headers_NEXT_DID_POSTPONE_HEADERundefined12681293app_router_headers_NEXT_REWRITTEN_PATH_HEADERundefined13301356app_router_headers_NEXT_REWRITTEN_QUERY_HEADERundefined13941417app_router_headers_NEXT_IS_PRERENDER_HEADERundefined14491476app_router_headers_NEXT_ACTION_NOT_FOUND_HEADERundefinedRawSource@ ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js n{#export class InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map {"version":3,"sources":["webpack://../../../src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":"AAAA,OAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAA,CAAE,GAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"file":"x"}|3619invariant_error_InvariantErrorundefinedRawSourceX ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js j#webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared54186undefined188277undefined279344undefined346409undefined411417undefined768774undefined10301036undefined17091715undefined27202726undefined35213527undefined41094115undefined47914797undefined54005406undefined58735879undefined6793work_unit_async_storage_external_throwForMissingRequestStoreundefined54665487work_unit_async_storage_external_getRuntimeStagePromiseundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js gtw7619lib_invariant_error_InvariantErrorundefinedRawSource: ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js ehwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware12541260undefinedY ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js cp// We share the tags manifest between the "use cache" handlers and the previous // file-system cache. export const tagsManifest = new Map(); export const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;AACrB,OAAO,MAAMA,eAAe,IAAIC,MAAqB;AAErD,OAAO,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0],"file":"x"}#false102108undefined141147undefinedP ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js _l/** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ import { LRUCache } from '../lru-cache'; import { isStale, tagsManifest } from '../incremental-cache/tags-manifest.external'; // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; export default DefaultCacheHandler; //# sourceMappingURL=default.external.js.map {"version":3,"sources":["webpack://../../../../src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,SACtB,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BE;AAEJ,MAAMC,sBAAsC;IAC1C,MAAMC,KAAIC,QAAQ;QAChB,MAAMC,iBAAiBZ,YAAYU,GAAG,CAACC;QAEvC,IAAIC,gBAAgB;YAClBV,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,MAAMC;QACR;QAEA,MAAMC,eAAehB,YAAYa,GAAG,CAACC;QAErC,IAAI,CAACE,cAAc;YACjBX,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,OAAOH;QACT;QAEA,MAAMV,QAAQe,aAAaf,KAAK;QAChC,IACEgB,YAAYC,UAAU,GAAGD,YAAYE,GAAG,KACxClB,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B,UAAU;YAC7C;YAEAzC,YAAY4B,GAAG,CAACd,UAAU;gBACxBb;gBACAyC,WAAW;gBACXC,iBAAiB;gBACjBzC;YACF;YAEAG,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;QAC3B,EAAE,OAAO8B,KAAK;YACZ,+DAA+D;YAC/DvC,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU,UAAU8B;QACrC,SAAU;YACRd;YACA3B,YAAY0C,MAAM,CAAC/B;QACrB;IACF;IAEA,MAAMgC;IACJ,gDAAgD;IAClD;IAEA,MAAMC,eAAc,GAAGzB,IAAI;QACzB,MAAM0B,aAAaC,KAAKC,GAAG,IACtB5B,KAAK6B,GAAG,CAAC,CAACC,MAAQrD,aAAac,GAAG,CAACuC,QAAQ;QAGhD/C,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,aAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;AAEA,eAAeR,oBAAmB","ignoreList":[0],"file":"x"}false448487undefined489572undefined652659__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined17771783__WEBPACK_MODULE_REFERENCE__47_5b2269735374616c65225d_call_directImport_asiSafe1__._undefined29542959Bufferundefined37063717__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined41954206__WEBPACK_MODULE_REFERENCE__47_5b22746167734d616e6966657374225d_call_asiSafe1__._undefined42484262/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined42484262undefined42634262(/* unused pure expression or super */ null && (undefined42824281))undefined42824282.5);undefined603683LRUCacheundefined880898default_external_DefaultCacheHandlerundefined18011884isStaleundefined38073887tagsManifestundefined43654445tagsManifestundefined45224547default_externalundefined46004618default_external_DefaultCacheHandlerundefinedRawSource? ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js Zwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware072undefined797803undefined28532859undefined34163422undefined38063812undefined41174123undefinedK711handlers_debugundefined888892handlers_debugundefined913917handlers_debugundefined990994handlers_debugundefined10151019handlers_debugundefined12841288handlers_debugundefined13091313handlers_debugundefined14551459handlers_debugundefined14801484handlers_debugundefined17171721handlers_debugundefined17421746handlers_debugundefined19191923handlers_debugundefined19441948handlers_debugundefined20952099handlers_debugundefined21202124handlers_debugundefined22572261handlers_debugundefined22822286handlers_debugundefined44194423handlers_debugundefined44444448handlers_debugundefinedRawSource? ;// ./node_modules/next/dist/esm/server/revalidation-utils.js Wwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware055undefined142148undefined20362051__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c657273225d_call_directImport_asiSafe1__._undefined22242230undefined*19732074getCacheHandlersundefinedRawSourceUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middleware876882undefined10591065undefined12391245undefined645async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined258278async_local_storage_FakeAsyncLocalStorageundefined312351async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined520559async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined595634async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined675714async_local_storage_sharedAsyncLocalStorageNotAvailableErrorundefined778805async_local_storage_maybeGlobalAsyncLocalStorageundefined885907app_render_async_local_storage_createAsyncLocalStorageundefined921948async_local_storage_maybeGlobalAsyncLocalStorageundefined972999async_local_storage_maybeGlobalAsyncLocalStorageundefined10251045async_local_storage_FakeAsyncLocalStorageundefined10611072async_local_storage_bindSnapshotundefined10881115async_local_storage_maybeGlobalAsyncLocalStorageundefined11351162async_local_storage_maybeGlobalAsyncLocalStorageundefined11911211async_local_storage_FakeAsyncLocalStorageundefined12341247async_local_storage_createSnapshotundefined12611288async_local_storage_maybeGlobalAsyncLocalStorageundefined13081335async_local_storage_maybeGlobalAsyncLocalStorageundefinedRawSourceY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js R webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middleware063undefined6571undefined110132__WEBPACK_MODULE_REFERENCE__51_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedM39154app_render_async_local_storage_createAsyncLocalStorageundefinedRawSourceY ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js Owebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware54213undefined215247undefined @ ;// ./node_modules/next/dist/esm/server/after/after-context.js M9webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middleware053undefined55120undefined122179undefined181257undefined259321undefined323387undefined389474undefined476563undefined565571undefined829840__WEBPACK_MODULE_REFERENCE__44_5b2264656661756c74225d_directImport_asiSafe1__._undefined917926__WEBPACK_MODULE_REFERENCE__35_5b2269735468656e61626c65225d_call_directImport_asiSafe1__._undefined17631782__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined19181938__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined30943105__WEBPACK_MODULE_REFERENCE__51_5b2262696e64536e617073686f74225d_call_directImport_asiSafe1__._undefined31593179__WEBPACK_MODULE_REFERENCE__53_5b2261667465725461736b4173796e6353746f72616765225d_call_asiSafe1__._undefined37823797__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined38813894__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined41124133__WEBPACK_MODULE_REFERENCE__50_5b227769746845786563757465526576616c696461746573225d_call_directImport_asiSafe1__._undefined49754988__WEBPACK_MODULE_REFERENCE__45_5b22496e76617269616e744572726f72225d_directImport_asiSafe1__._undefined265343(p_queue_default())undefined420509isThenableundefined13461442workUnitAsyncStorageInstanceundefined15781676afterTaskAsyncStorageInstanceundefined28322925async_local_storage_bindSnapshotundefined29793077afterTaskAsyncStorageInstanceundefined36803768workAsyncStorageInstanceundefined38523944lib_invariant_error_InvariantErrorundefined41624275withExecuteRevalidatesundefined51175209lib_invariant_error_InvariantErrorundefinedRawSource< ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js Jwwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware181187undefined807813undefinedE ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js Hwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middleware053undefined55129undefined131184undefined186248undefined250316undefined318324undefined18131828__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6541707050617468225d_call_directImport_asiSafe1__._undefined29532966__WEBPACK_MODULE_REFERENCE__51_5b22637265617465536e617073686f74225d_call_directImport_asiSafe1__._undefined32733284__WEBPACK_MODULE_REFERENCE__54_5b224166746572436f6e74657874225d_directImport_asiSafe1__._undefined36213642__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined38293844__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined14931594normalizeAppPathundefined27192816async_local_storage_createSnapshotundefined31233211AfterContextundefined35483661getCacheHandlerEntriesundefined38483949createLazyResultundefinedRawSource= ;// ./node_modules/next/dist/esm/server/web/web-on-close.js Ewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware136142undefined616622undefined11741180undefinedG ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js Cswebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middleware235241undefinedJ ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js Awebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware075undefined7783undefined585591undefined> ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js ?webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware064undefined66128undefined130178undefined12761297__WEBPACK_MODULE_REFERENCE__49_5b22676574436163686548616e646c6572456e7472696573225d_call_directImport_asiSafe1__._undefined14861501__WEBPACK_MODULE_REFERENCE__55_5b226372656174654c617a79526573756c74225d_call_directImport_asiSafe1__._undefined16191625undefined19401965__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined22262251__WEBPACK_MODULE_REFERENCE__2_5b224e4558545f43414348455f494d504c494349545f5441475f4944225d_directImport_asiSafe1__._undefined10991212getCacheHandlerEntriesundefined14011502createLazyResultundefined19342049NEXT_CACHE_IMPLICIT_TAG_IDundefined23102425NEXT_CACHE_IMPLICIT_TAG_IDundefinedRawSource? ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js <kwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware163169undefined8 ;// ./node_modules/next/dist/esm/server/web/adapter.js :webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware044undefined46124undefined126217undefined219273undefined275331undefined333428undefined430466undefined468529undefined531604undefined606772undefined774833undefined835908undefined910995undefined9971058undefined10601136undefined11381226undefined12281275undefined12771332undefined13341382undefined13841446undefined14481523undefined15251579undefined15811639undefined16411647undefined16781688__WEBPACK_MODULE_REFERENCE__20_5b224e65787452657175657374225d_directImport_asiSafe1__._undefined18641881__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined21212138__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined23762393__WEBPACK_MODULE_REFERENCE__1_5b22506167655369676e61747572654572726f72225d_directImport_asiSafe1__._undefined27592767__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined32473253__webpack_require__undefined32553299720undefined34113417undefined35293559__WEBPACK_MODULE_REFERENCE__0_5b22656e73757265496e737472756d656e746174696f6e52656769737465726564225d_call_directImport_asiSafe1__._undefined37153729__WEBPACK_MODULE_REFERENCE__28_5b226e6f726d616c697a6552736355524c225d_call_directImport_asiSafe1__._undefined38323838__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined43344356__WEBPACK_MODULE_REFERENCE__3_5b226e6f726d616c697a654e6578745175657279506172616d225d_call_directImport_asiSafe1__._undefined49004926__WEBPACK_MODULE_REFERENCE__3_5b2266726f6d4e6f64654f7574676f696e674874747048656164657273225d_call_directImport_asiSafe1__._undefined50455062__WEBPACK_MODULE_REFERENCE__61_5b22697352534352657175657374486561646572225d_call_directImport_asiSafe1__._undefined50835092__WEBPACK_MODULE_REFERENCE__24_5b225253435f484541444552225d_directImport_asiSafe1__._undefined53515364__WEBPACK_MODULE_REFERENCE__24_5b22464c494748545f48454144455253225d_directImport_asiSafe1__._undefined56085653 falseundefined565756830undefined57495768__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined59165940__WEBPACK_MODULE_REFERENCE__25_5b227374726970496e7465726e616c536561726368506172616d73225d_call_directImport_asiSafe1__._undefined69396958"production"undefined70127052""undefined70727091"production"undefined74027420__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined76857708__WEBPACK_MODULE_REFERENCE__59_5b226765744275696c74696e52657175657374436f6e74657874225d_call_directImport_asiSafe1__._undefined77927805__WEBPACK_MODULE_REFERENCE__4_5b224e65787446657463684576656e74225d_directImport_asiSafe1__._undefined86048618__WEBPACK_MODULE_REFERENCE__57_5b22436c6f7365436f6e74726f6c6c6572225d_directImport_asiSafe1__._undefined86428650__WEBPACK_MODULE_REFERENCE__36_5b22676574547261636572225d_call_directImport_asiSafe1__._undefined86608673__WEBPACK_MODULE_REFERENCE__34_5b224d6964646c65776172655370616e225d_asiSafe1__._undefined93209338__WEBPACK_MODULE_REFERENCE__58_5b22676574456467655072657669657750726f7073225d_call_directImport_asiSafe1__._undefined95169530__WEBPACK_MODULE_REFERENCE__60_5b22676574496d706c6963697454616773225d_call_directImport_asiSafe1__._undefined96189641__WEBPACK_MODULE_REFERENCE__39_5b226372656174655265717565737453746f7265466f72415049225d_call_directImport_asiSafe1__._undefined97539767__WEBPACK_MODULE_REFERENCE__56_5b22637265617465576f726b53746f7265225d_call_directImport_asiSafe1__._undefined1092310949__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f524f555445525f50524546455443485f484541444552225d_directImport_asiSafe1__._undefined1112011135__WEBPACK_MODULE_REFERENCE__32_5b22776f726b4173796e6353746f72616765225d_call_asiSafe1__._undefined1115611175__WEBPACK_MODULE_REFERENCE__43_5b22776f726b556e69744173796e6353746f72616765225d_call_asiSafe1__._undefined1268612692__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1285512901 trueundefined1341613431__WEBPACK_MODULE_REFERENCE__23_5b22706172736552656c617469766555524c225d_call_directImport_asiSafe1__._undefined1370613759 falseundefined13764138050undefined1423214257__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f504154485f484541444552225d_directImport_asiSafe1__._undefined1439414420__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f52455752495454454e5f51554552595f484541444552225d_directImport_asiSafe1__._undefined1538415403__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1544915468__WEBPACK_MODULE_REFERENCE__24_5b224e4558545f5253435f554e494f4e5f5155455259225d_directImport_asiSafe1__._undefined1594815954__WEBPACK_MODULE_REFERENCE__17_5b224e65787455524c225d_directImport_asiSafe1__._undefined1631716363trueundefined1693716950__WEBPACK_MODULE_REFERENCE__23_5b2267657452656c617469766555524c225d_call_directImport_asiSafe1__._undefined1706517076__WEBPACK_MODULE_REFERENCE__22_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined1778417811__WEBPACK_MODULE_REFERENCE__4_5b2267657457616974556e74696c50726f6d69736546726f6d4576656e74225d_call_directImport_asiSafe1__._undefined`53139NextRequestundefined315414PageSignatureErrorundefined654753PageSignatureErrorundefined9911090PageSignatureErrorundefined14561543tracer_getTracerundefined22682398ensureInstrumentationRegisteredundefined25542653normalizeRscURLundefined27562834NextURLundefined33303444normalizeNextQueryParamundefined39884110fromNodeOutgoingHttpHeadersundefined42294334isRSCRequestHeaderundefined43554439RSC_HEADERundefined46984790FLIGHT_HEADERSundefined51095213NEXT_RSC_UNION_QUERYundefined53615480stripInternalSearchParamsundefined68876994getEdgePreviewPropsundefined72597376getBuiltinRequestContextundefined74607551NextFetchEventundefined83508444CloseControllerundefined84688555tracer_getTracerundefined85658644MiddlewareSpanundefined92919398getEdgePreviewPropsundefined95769675getImplicitTagsundefined97639880createRequestStoreForAPIundefined999210091createWorkStoreundefined1124711365NEXT_ROUTER_PREFETCH_HEADERundefined1153611624workAsyncStorageInstanceundefined1164511741workUnitAsyncStorageInstanceundefined1325213330NextURLundefined1401214113parseRelativeURLundefined1482514941NEXT_REWRITTEN_PATH_HEADERundefined1507815196NEXT_REWRITTEN_QUERY_HEADERundefined1616016264NEXT_RSC_UNION_QUERYundefined1631016414NEXT_RSC_UNION_QUERYundefined1689416972NextURLundefined1791218009getRelativeURLundefined1812418204NextResponseundefined1891219036getWaitUntilPromiseFromEventundefinedRawSource // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js 7webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware053undefined5561undefined474480undefined626632undefinedK ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js 5wwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middleware145186undefined8 ;// ./node_modules/next/dist/esm/server/after/after.js 3pwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware076undefined187193undefined8 ;// ./node_modules/next/dist/esm/server/after/index.js 1awebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware023undefined // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js /<const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; export class DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } export function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map {"version":3,"sources":["webpack://../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAAA,CAAE,IAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}!false5157undefined258264undefined=5774hooks_server_context_DynamicServerErrorundefinedRawSourceQ ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js *7const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; export class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } export function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map {"version":3,"sources":["webpack://../../../src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":"AAAA,MAAMA,0BAA0B;AAEhC,OAAO,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEA,OAAO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAAA,CAAI,EAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0],"file":"x"}!false5965undefined205211undefinedE6585static_generation_bailout_StaticGenBailoutErrorundefinedRawSourceD ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js %webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware06undefined11021108undefined25102516undefinedD11041121dynamic_rendering_utils_makeHangingPromiseundefinedRawSourceF ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js "}webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middleware06undefined6874undefined136142undefined200206undefinedL ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js  -// This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map {"version":3,"sources":["webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAAA,CAAE,EAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0],"file":"x"}#false260266undefined566572undefined8266282bailout_to_csr_BailoutToCSRErrorundefinedRawSourceI ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js (xx/** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly import React from 'react'; import { DynamicServerError } from '../../client/components/hooks-server-context'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { getRuntimeStagePromise, workUnitAsyncStorage } from './work-unit-async-storage.external'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants'; import { scheduleOnNextTick } from '../../lib/scheduler'; import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'; import { InvariantError } from '../../shared/lib/invariant-error'; const hasPostpone = typeof React.unstable_postpone === 'function'; export function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } export function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } export function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ export function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("production" !== 'production') { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } export function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ export function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport export const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; export function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } export function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } export function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } export function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } export function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } export function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } export function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ export function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ export function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } export function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } export function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); export function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = "production" !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } export var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); export function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } export function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } export function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map {"version":3,"sources":["webpack://../../../src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;AACxF,OAAOA,WAAW,QAAO;AAEzB,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SAASC,qBAAqB,QAAQ,oDAAmD;AACzF,SACEC,sBAAsB,EACtBC,oBAAoB,QACf,qCAAoC;AAC3C,SAASC,gBAAgB,QAAQ,4CAA2C;AAC5E,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,QACpB,yCAAwC;AAC/C,SAASC,kBAAkB,QAAQ,s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;QACZ;IACF,OAAO;QACL,IACEsH,kBAAkBhG,iBAAiB,KAAK,SACxCgG,kBAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC;QACZ;IACF;AACF;AAEA,OAAO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"file":"x"}false15771602undefined16041685undefined16871776undefined17781875undefined18771953undefined19552018undefined20202172undefined21742230undefined22322312undefined23142379undefined24082412__WEBPACK_MODULE_REFERENCE__68_5b2264656661756c74225d_asiSafe1__._undefined24482454undefined26402646undefined28782884undefined34183424undefined60116039falseundefined60426114{}undefined64066412undefined73497355undefined81368164falseundefined81678231{}undefined89888994undefined97459751undefined1038310389undefined1216512171undefined1253412540undefined1258812587(/* unused pure expression or super */ null && (undefined1262512624))undefined1262712633undefined1292012926undefined1374213748undefined1484414850undefined1506915075undefined1516515171undefined1551815524undefined1712317129undefined1769017696undefined1983919845undefined2017520181undefined2356723591__WEBPACK_MODULE_REFERENCE__72_5b22524f4f545f4c41594f55545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2366023681__WEBPACK_MODULE_REFERENCE__72_5b224d455441444154415f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2374423765__WEBPACK_MODULE_REFERENCE__72_5b2256494557504f52545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2382623845__WEBPACK_MODULE_REFERENCE__72_5b224f55544c45545f424f554e444152595f4e414d45225d_directImport_asiSafe1__._undefined2385923865undefined2606826123 falseundefined26127261510undefined2642926435undefined2669326699undefined2746427470undefined3058830594undefined816141679react_react_serverundefined43694388dynamic_rendering_postponeWithTrackingundefined55595590dynamic_rendering_throwToInterruptStaticGenerationundefined64956525dynamic_rendering_trackDynamicDataInDynamicRenderundefined1191511934dynamic_rendering_postponeWithTrackingundefined1198011999dynamic_rendering_postponeWithTrackingundefined2029720316dynamic_rendering_postponeWithTrackingundefined2254822662ROOT_LAYOUT_BOUNDARY_NAMEundefined2273122839METADATA_BOUNDARY_NAMEundefined2290223010VIEWPORT_BOUNDARY_NAMEundefined2307123175OUTLET_BOUNDARY_NAMEundefinedRawSource: ;// ./node_modules/next/dist/esm/server/request/utils.js #Limport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'; export function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } export function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } export function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } export function isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map b {"version":3,"sources":["webpack://../../../src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;AAGvF,OAAO,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,sBACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEA,OAAO,SAASI;IACd,MAAMC,iBAAiBb,sBAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAAA,AAAkB,MAAK;AAChD","ignoreList":[0],"file":"x"}_false089undefined91178undefined180186undefined626632undefined11151121undefined18801886undefined?16901720utils_isRequestAPICallableInsideAfterundefinedRawSource? ;// ./node_modules/next/dist/esm/server/request/connection.js Mimport { workAsyncStorage } from '../app-render/work-async-storage.external'; import { throwForMissingRequestStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { postponeWithTracking, throwToInterruptStaticGeneration, trackDynamicDataInDynamicRender } from '../app-render/dynamic-rendering'; import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'; import { makeHangingPromise, makeDevtoolsIOAwarePromise } from '../dynamic-rendering-utils'; import { isRequestAPICallableInsideAfter } from './utils'; /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ export function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if ("production" === 'development') { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeDevtoolsIOAwarePromise(undefined); } else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ^!{"version":3,"sources":["webpack://../../../src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynamicTracking","process","env","NODE_ENV"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,4CAA2C;AAC5E,SACEC,2BAA2B,EAC3BC,oBAAoB,QACf,iDAAgD;AACvD,SACEC,oBAAoB,EACp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,EAAEJ,UAAUK,KAAK,CAAC,iXAAiX,CAAC,GAD/X,qBAAA;mCAAA;wCAAA;0CAAA;wBAEd;wBACAD,MAAMS,iBAAiB,CAACD,OAAOd;wBAC/BE,UAAUc,wBAAwB,KAAKF;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBACH,MAAM,OAAA,cAEL,CAFK,IAAIR,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,0XAA0X,CAAC,GADhZ,qBAAA;+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,OAAOV,mBACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,OAAOd,qBACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,OAAOxB,iCACL,cACAQ,WACAE;gBAEJ,KAAK;oBACHT,gCAAgCS;oBAChC,IAAIe,AA1Fc,QA0FNC,GAAG,CAACC,KAAa,GAAL,YAAoB;wBAC1C,wEAAwE;wBACxE,8EAA8E;wBAC9E,4EAA4E;wBAC5E,OAAOvB,2BAA2Ba;oBACpC,OAAO;wBACL,OAAOF,QAAQC,OAAO,CAACC;oBACzB;gBACF;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;IACzEb,4BAA4BU;AAC9B","ignoreList":[0],"file":"x"}false076undefined78192undefined194331undefined333422undefined424515undefined517574undefined777783undefined62136242falseundefined62456638{}undefinedD ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js  // This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; export function describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } export function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } export const wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map R {"version":3,"sources":["webpack://../../../../src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAErC,OAAO,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEA,OAAO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEA,OAAO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0],"file":"x"}2false466472undefined695701undefined939945undefinedr475502reflect_utils_describeStringPropertyAccessundefined931949reflect_utils_wellKnownPropertiesundefinedRawSourceU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js i webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared063undefined6571undefined107129__WEBPACK_MODULE_REFERENCE__30_5b226372656174654173796e634c6f63616c53746f72616765225d_call_directImport_asiSafe1__._undefinedB36151async_local_storage_createAsyncLocalStorageundefinedRawSourceU ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js g@webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared54181undefined183242undefined4 ;// ./node_modules/next/dist/esm/lib/picocolors.js f_webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware17941800undefined18151814(/* unused pure expression or super */ null && (undefined18591858))undefined18611867undefined19341940undefined20062012undefined20622068undefined21212127undefined21782184undefined22342240undefined22972303undefined23532359undefined24072413undefined24632469undefined25202526undefined25752581undefined26332639undefined27042710undefined27592765undefined28152821undefined28702876undefined29282934undefined29842990undefined30423048undefined31013107undefined31583164undefined32183224undefined32753281undefinedL18001804picocolors_resetundefined21922197picocolors_hiddenundefinedRawSource6 ;// ./node_modules/next/dist/esm/build/output/log.js dwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware079undefined81134undefined136142undefined172176__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined178181__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined201203__WEBPACK_MODULE_REFERENCE__80_5b22726564225d_call_directImport_asiSafe1__._undefined205208__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined227232__WEBPACK_MODULE_REFERENCE__80_5b2279656c6c6f77225d_call_directImport_asiSafe1__._undefined234237__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined272276__WEBPACK_MODULE_REFERENCE__80_5b227768697465225d_call_directImport_asiSafe1__._undefined278281__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined301305__WEBPACK_MODULE_REFERENCE__80_5b22677265656e225d_call_directImport_asiSafe1__._undefined307310__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined330336__WEBPACK_MODULE_REFERENCE__80_5b226d6167656e7461225d_call_directImport_asiSafe1__._undefined338341__WEBPACK_MODULE_REFERENCE__80_5b22626f6c64225d_call_directImport_asiSafe1__._undefined12661272undefined14931499undefined15671573undefined16431649undefined17171723undefined17931799undefined18671873undefined19431949undefined20452052__WEBPACK_MODULE_REFERENCE__46_5b224c52554361636865225d_directImport_asiSafe1__._undefined20852091undefined`31110whiteundefined112189boldundefined209284redundefined286363boldundefined382463yellowundefined465542boldundefined577656whiteundefined658735boldundefined755834greenundefined836913boldundefined9331016magentaundefined10181095boldundefined25882592log_eventundefined26572661log_traceundefined27432823LRUCacheundefined28652872log_warnOnceundefinedRawSource@ ;// ./node_modules/next/dist/esm/server/request/root-params.js  y5import { InvariantError } from '../../shared/lib/invariant-error'; import { postponeWithTracking, throwToInterruptStaticGeneration } from '../app-render/dynamic-rendering'; import { workAsyncStorage } from '../app-render/work-async-storage.external'; import { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'; import { makeHangingPromise } from '../dynamic-rendering-utils'; import { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils'; import { actionAsyncStorage } from '../app-render/action-async-storage.external'; import { warnOnce } from '../../build/output/log'; const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ export async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ export function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map H{"version":3,"sources":["webpack://../../../src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SACEC,oBAAoB,EACpBC,gCAAgC,QAC3B,kCAAiC;AACxC,SACEC,gBAAgB,QAEX,4CAA2C;AAClD,SACEC,oBAAoB,QAIf,iDAAgD;AACvD,SAASC,kBAAkB,QAAQ,6BAA4B;AAG/D,SACEC,4BAA4B,EAC5BC,mBAAmB,QACd,uCAAsC;AAC7C,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,QAAQ,QAAQ,yBAAwB;AAGjD,MAAMC,eAAe,IAAIC;AAEzB;;CAEC,GACD,OAAO,eAAeC;IACpBH,SACE;IAEF,MAAMI,YAAYV,iBAAiBW,QAAQ;IAC3C,IAAI,CAACD,WAAW;QACd,MAAM,OAAA,cAA8D,CAA9D,IAAIb,eAAe,6CAAnB,qBAAA;mBAAA;wBAAA;0BAAA;QAA6D;IACrE;IAEA,MAAMe,gBAAgBX,qBAAqBU,QAAQ;IAEnD,IAAI,CAACC,eAAe;QAClB,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,MAAM,EAAEH,UAAUI,KAAK,CAAC,8FAA8F,CAAC,GADpH,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,OAAQF,cAAcG,IAAI;QACxB,KAAK;QACL,KAAK;YAAkB;gBACrB,MAAM,OAAA,cAEL,CAFK,IAAIF,MACR,CAAC,MAAM,EAAEH,UAA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BACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,OAAOzC,iCACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACF","ignoreList":[0],"file":"x"}false065undefined67171undefined173249undefined251336undefined338401undefined403507undefined509589undefined591640undefined762768undefined73687374undefined> ;// ./node_modules/next/dist/esm/server/web/exports/index.js _webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware77141undefined143198undefined200257undefined259336undefined338396undefined398433undefined435488undefined490553undefined0 ;// ./node_modules/next/dist/esm/api/server.js ^Ywebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware043undefined ;// ./src/middleware.js import { NextResponse } from "next/server"; const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } export function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } export const config = { matcher: "/api/:path*" }; {"version":3,"sources":["webpack://./src/middleware.js"],"sourcesContent":["import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n"],"names":["NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","Map","getClientIp","request","headers","get","split","trim","checkRateLimitLocal","key","max","windowMs","now","Date","has","set","timestamps","filter","t","push","allowed","length","remaining","Math","reset","ceil","middleware","pathname","nextUrl","startsWith","next","ip","useRedis","process","env","REDIS_URL","COSMIC_REDIS_ENABLED","result","JSON","stringify","error","status","String","response","config","matcher"],"mappings":"AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AAEvB,MAAMC,OAAO,IAAIC;AAEjB,SAASC,YAAYC,OAAO;IAC1B,OAAOA,QAAQC,OAAO,CAACC,GAAG,CAAC,oBAAoBC,MAAM,IAAI,CAAC,EAAE,EAAEC,UACzDJ,QAAQC,OAAO,CAACC,GAAG,CAAC,gBACpB;AACP;AAEA,SAASG,oBAAoBC,GAAG,EAAEC,MAAMX,cAAc,EAAEY,WAAWb,SAAS;IAC1E,MAAMc,MAAMC,KAAKD,GAAG;IACpB,IAAI,CAACZ,KAAKc,GAAG,CAACL,MAAMT,KAAKe,GAAG,CAACN,KAAK,EAAE;IACpC,MAAMO,aAAahB,KAAKK,GAAG,CAACI,KAAKQ,MAAM,CAACC,CAAAA,IAAKN,MAAMM,IAAIP;IACvDK,WAAWG,IAAI,CAACP;IAChBZ,KAAKe,GAAG,CAACN,KAAKO;IACd,OAAO;QACLI,SAASJ,WAAWK,MAAM,IAAIX;QAC9BY,WAAWC,KAAKb,GAAG,CAAC,GAAGA,MAAMM,WAAWK,MAAM;QAC9CG,OAAOD,KAAKE,IAAI,CAACb,MAAM,QAAQW,KAAKE,IAAI,CAACd,WAAW;IACtD;AACF;AAEA,OAAO,SAASe,WAAWvB,OAAO;IAChC,MAAM,EAAEwB,QAAQ,EAAE,GAAGxB,QAAQyB,OAAO;IACpC,IAAI,CAACD,SAASE,UAAU,CAAC,UAAU,OAAOhC,aAAaiC,IAAI;IAE3D,MAAMC,KAAK7B,YAAYC;IACvB,MAAM6B,WAAWC,QAAQC,GAAG,CAACC,SAAS,IAAIF,QAAQC,GAAG,CAACE,oBAAoB,KAAK;IAE/E,IAAI,CAACJ,UAAU;QACb,MAAMK,SAAS7B,oBAAoB,CAAC,GAAG,EAAEuB,IAAI;QAC7C,IAAI,CAACM,OAAOjB,OAAO,EAAE;YACnB,OAAO,IAAIvB,aAAayC,KAAKC,SAAS,CAAC;gBAAEC,OAAO;YAAwC,IAAI;gBAC1FC,QAAQ;gBACRrC,SAAS;oBACP,gBAAgB;oBAChB,qBAAqBsC,OAAO3C;oBAC5B,yBAAyB;oBACzB,qBAAqB2C,OAAOL,OAAOb,KAAK;oBACxC,iBAAiB;gBACnB;YACF;QACF;QACA,MAAMmB,WAAW9C,aAAaiC,IAAI;QAClCa,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAO3C;QACjD4C,SAASvC,OAAO,CAACW,GAAG,CAAC,yBAAyB2B,OAAOL,OAAOf,SAAS;QACrEqB,SAASvC,OAAO,CAACW,GAAG,CAAC,qBAAqB2B,OAAOL,OAAOb,KAAK;QAC7D,OAAOmB;IACT;IAEA,OAAO9C,aAAaiC,IAAI;AAC1B;AAEA,OAAO,MAAMc,SAAS;IACpBC,SAAS;AACX,EAAE","file":"x"}false042undefined746752undefined872883__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined11531164__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_directImport_asiSafe1__._undefined16711682__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19631974__WEBPACK_MODULE_REFERENCE__84_5b224e657874526573706f6e7365225d_call_asiSafe1__._undefined19861992undefined{822902NextResponseundefined11721260NextResponseundefined17671847NextResponseundefined21282208NextResponseundefinedRawSourcea ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js 1export const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ export function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } export function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } export function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map  {"version":3,"sources":["webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"file":"x"}Nfalse06undefined173179undefined515521undefined864870undefined10011007undefinedF510534http_access_fallback_isHTTPAccessFallbackErrorundefinedRawSourceL ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js export var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map h{"version":3,"sources":["webpack://../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0],"file":"x"}<421redirect_status_code_RedirectStatusCodeundefinedRawSourceF ;// ./node_modules/next/dist/esm/client/components/redirect-error.js cimport { RedirectStatusCode } from './redirect-status-code'; export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; export var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ export function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map i{"version":3,"sources":["webpack://../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAAA,CAAI,IAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAA,CAAK,IACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0],"file":"x"}<false059undefined6167undefined113119undefined502508undefined6437451redirect_error_isRedirectErrorundefinedRawSourceL ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js import { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback'; import { isRedirectError } from './redirect-error'; /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ export function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map {"version":3,"sources":["webpack://../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0],"file":"x"}.false087undefined89139undefined316322undefined ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19! Kwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware037undefined3993undefined124187undefined189269undefined271355undefined378381__WEBPACK_MODULE_REFERENCE__85_ns_asiSafe1__._undefined12221258falseundefined12611471{}undefined16221654__WEBPACK_MODULE_REFERENCE__0_5b2265646765496e737472756d656e746174696f6e4f6e526571756573744572726f72225d_call_directImport_asiSafe1__._undefined20442058undefined20962102__WEBPACK_MODULE_REFERENCE__62_5b2261646170746572225d_call_directImport_asiSafe1__._undefinedr55100middleware_namespaceObjectundefined11001234edgeInstrumentationOnRequestErrorundefined16611744adapterundefined, /***/ 213:  [webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource/***/ ((module) => { webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource )webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcevar __dirname = "/"; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource&(()=>{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue})();module.exports=n})();Uwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middlewareC u}true__dirnamebuffersourcesizemapshash&var __dirname = "/"; (()=>{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue})();module.exports=n})(); {"finalSource":true}mapbuf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,IAAI,MAAM,mCAAmC,aAAa,aAAa,8BAA8B,0DAA0D,OAAO,mCAAmC,mBAAmB,kBAAkB,4CAA4C,cAAc,sEAAsE,gCAAgC,2BAA2B,yEAAyE,qBAAqB,gBAAgB,mCAAmC,kBAAkB,yBAAyB,mBAAmB,iCAAiC,oFAAoF,EAAE,MAAM,SAAS,IAAI,oBAAoB,qBAAqB,gBAAgB,EAAE,4BAA4B,oBAAoB,qBAAqB,sBAAsB,IAAI,gJAAgJ,uEAAuE,KAAK,iBAAiB,GAAG,WAAW,SAAS,KAAK,cAAc,2BAA2B,0BAA0B,iBAAiB,GAAG,kBAAkB,oDAAoD,QAAQ,oBAAoB,YAAY,qBAAqB,qBAAqB,YAAY,QAAQ,oBAAoB,QAAQ,iCAAiC,gBAAgB,yBAAyB,OAAO,wBAAwB,2BAA2B,wBAAwB,IAAI,KAAK,GAAG,eAAe,iDAAiD,OAAO,wBAAwB,0BAA0B,uBAAuB,IAAI,KAAK,GAAG,WAAW,wBAAwB,UAAU,oCAAoC,cAAc,0BAA0B,eAAe,sBAAsB,cAAc,qBAAqB,eAAe,iBAAiB,oBAAoB,IAAI,iBAAiBUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middleware&(()=>{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue})();module.exports=n})();ConcatSourceRawSourcevar __dirname = "/"; ReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middleware32563259trueundefined52375245__dirnameundefined /***/ }) w&/***/ ((module) => { var __dirname = "/"; (()=>{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue})();module.exports=n})(); /***/ }) x{x0 ;;;AAAA,MAAM,aAAa,OAAO,QAAQ,4CAA4C,mBAAmB,kBAAkB,qCAAqC,mCAAmC,mBAAmB,UAAU,eAAe,mBAAmB,gCAAgC,0BAA0B,uDAAuD,iCAAiC,iDAAiD,8CAA8C,mCAAmC,SAAS,yBAAyB,6CAA6C,yBAAyB,wBAAwB,wBAAwB,oBAAoB,wDAAwD,aAAa,kCAAkC,yBAAyB,sCAAsC,iCAAiC,iDAAiD,UAAU,uDAAuD,gCAAgC,eAAe,qBAAqB,sCAAsC,IAAI,KAAK,aAAa,UAAU,+DAA+D,gCAAgC,eAAe,iBAAiB,iBAAiB,uDAAuD,cAAc,iCAAiC,6CAA6C,SAAS,qDAAqD,UAAU,wCAAwC,0CAA0C,4CAA4C,8CAA8C,gDAAgD,kDAAkD,yBAAyB,IAAI,KAAK,oB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AG,eAAe,iDAAiD,OAAO,wBAAwB,0BAA0B,uBAAuB,IAAI,KAAK,GAAG,WAAW,wBAAwB,UAAU,oCAAoC,cAAc,0BAA0B,eAAe,sBAAsB,cAAc,qBAAqB,eAAe,iBAAiB,oBAAoB,IAAI,iBAAiB,IUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middleware&(()=>{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue})();module.exports=n})(); /***/ ((module) => { var __dirname = "/"; webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middleware32563259trueundefined52375245__dirnameundefined, /***/ 356:  pwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource(module.exports = require("node:buffer");external commonjs "node:buffer" /***/ }) eV/***/ ((module) => { "use strict"; module.exports = require("node:buffer"); /***/ }) fipx ;;;AAAA,wCexternal commonjs "node:buffer"(module.exports = require("node:buffer");q$/***/ ((module) => { "use strict"; OriginalSource(external commonjs "node:buffer"RawSourcet, /***/ 392:  Kwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceS/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource 8webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getTestReqInfo: null, withRequest: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getTestReqInfo: function() { return getTestReqInfo; }, withRequest: function() { return withRequest; } }); const _nodeasync_hooks = require("node:async_hooks"); const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); function extractTestInfoFromRequest(req, reader) { const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); if (!proxyPortHeader) { return undefined; } const url = reader.url(req); const proxyPort = Number(proxyPortHeader); const testData = reader.header(req, 'next-test-data') || ''; return { url, proxyPort, testData }; } function withRequest(req, reader, fn) { const testReqInfo = extractTestInfoFromRequest(req, reader); if (!testReqInfo) { return fn(); } return testStorage.run(testReqInfo, fn); } function getTestReqInfo(req, reader) { const testReqInfo = testStorage.getStore(); if (testReqInfo) { return testReqInfo; } if (req && reader) { return extractTestInfoFromRequest(req, reader); } return undefined; } //# sourceMappingURL=context.js.map\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middlewaree :NNWDObject.defineProperty(exports, "__esModule", ())0__webpack_require__521buffersourcesizemapshashu Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getTestReqInfo: function() { return getTestReqInfo; }, withRequest: function() { return withRequest; } }); const _nodeasync_hooks = __webpack_require__(521); const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); function extractTestInfoFromRequest(req, reader) { const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); if (!proxyPortHeader) { return undefined; } const url = reader.url(req); const proxyPort = Number(proxyPortHeader); const testData = reader.header(req, 'next-test-data') || ''; return { url, proxyPort, testData }; } function withRequest(req, reader, fn) { const testReqInfo = extractTestInfoFromRequest(req, reader); if (!testReqInfo) { return fn(); } return testStorage.run(testReqInfo, fn); } function getTestReqInfo(req, reader) { const testReqInfo = testStorage.getStore(); if (testReqInfo) { return testReqInfo; } if (req && reader) { return extractTestInfoFromRequest(req, reader); } return undefined; } //# sourceMappingURL=context.js.map {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesxMAAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAGL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,yBAAyB,mBAAO,CAAC,GAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middleware"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getTestReqInfo: null, withRequest: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getTestReqInfo: function() { return getTestReqInfo; }, withRequest: function() { return withRequest; } }); const _nodeasync_hooks = require("node:async_hooks"); const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); function extractTestInfoFromRequest(req, reader) { const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); if (!proxyPortHeader) { return undefined; } const url = reader.url(req); const proxyPort = Number(proxyPortHeader); const testData = reader.header(req, 'next-test-data') || ''; return { url, proxyPort, testData }; } function withRequest(req, reader, fn) { const testReqInfo = extractTestInfoFromRequest(req, reader); if (!testReqInfo) { return fn(); } return testStorage.run(testReqInfo, fn); } function getTestReqInfo(req, reader) { const testReqInfo = testStorage.getStore(); if (testReqInfo) { return testReqInfo; } if (req && reader) { return extractTestInfoFromRequest(req, reader); } return undefined; } //# sourceMappingURL=context.js.mapReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871540undefined494500__webpack_require__undefined502519521undefined /***/ }) S/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getTestReqInfo: function() { return getTestReqInfo; }, withRequest: function() { return withRequest; } }); const _nodeasync_hooks = __webpack_require__(521); const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); function extractTestInfoFromRequest(req, reader) { const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); if (!proxyPortHeader) { return undefined; } const url = reader.url(req); const proxyPort = Number(proxyPortHeader); const testData = reader.header(req, 'next-test-data') || ''; return { url, proxyPort, testData }; } function withRequest(req, reader, fn) { const testReqInfo = extractTestInfoFromRequest(req, reader); if (!testReqInfo) { return fn(); } return testStorage.run(testReqInfo, fn); } function getTestReqInfo(req, reader) { const testReqInfo = testStorage.getStore(); if (testReqInfo) { return testReqInfo; } if (req && reader) { return extractTestInfoFromRequest(req, reader); } return undefined; } //# sourceMappingURL=context.js.map /***/ }) TW^xS;;;AAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAGL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,yBAAyB,mBAAO,CAAC,GAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middleware"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getTestReqInfo: null, withRequest: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getTestReqInfo: function() { return getTestReqInfo; }, withRequest: function() { return withRequest; } }); const _nodeasync_hooks = require("node:async_hooks"); const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); function extractTestInfoFromRequest(req, reader) { const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); if (!proxyPortHeader) { return undefined; } const url = reader.url(req); const proxyPort = Number(proxyPortHeader); const testData = reader.header(req, 'next-test-data') || ''; return { url, proxyPort, testData }; } function withRequest(req, reader, fn) { const testReqInfo = extractTestInfoFromRequest(req, reader); if (!testReqInfo) { return fn(); } return testStorage.run(testReqInfo, fn); } function getTestReqInfo(req, reader) { const testReqInfo = testStorage.getStore(); if (testReqInfo) { return testReqInfo; } if (req && reader) { return extractTestInfoFromRequest(req, reader); } return undefined; } //# sourceMappingURL=context.js.map_`bwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871540undefined494500__webpack_require__undefined502519521undefinedcd, /***/ 440:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource>/***/ ((__unused_webpack_module, exports) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource 7webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcevar __webpack_unused_export__; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource3/** * @license React * react.react-server.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict"; var ReactSharedInternals = { H: null, A: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { url += "?args[]=" + encodeURIComponent(arguments[1]); for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]); } return ( "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var isArrayImpl = Array.isArray; function noop() {} var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; maybeIterable = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } var hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: void 0 !== refProp ? refProp : null, props: props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return ( "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE ); } function escape(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return ( "$" + key.replace(/[=:]/g, function (match) { return escaperLookup[match]; }) ); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch ( ("string" === typeof thenable.status ? thenable.then(noop, noop) : ((thenable.status = "pending"), thenable.then( function (fulfilledValue) { "pending" === thenable.status && ((thenable.status = "fulfilled"), (thenable.value = fulfilledValue)); }, function (error) { "pending" === thenable.status && ((thenable.status = "rejected"), (thenable.reason = error)); } )), thenable.status) ) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if ("undefined" === type || "boolean" === type) children = null; var invokeCallback = !1; if (null === children) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return ( (invokeCallback = children._init), mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ) ); } } if (invokeCallback) return ( (callback = callback(children)), (invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar), isArrayImpl(callback) ? ((escapedPrefix = ""), null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) { return c; })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (null == callback.key || (children && children.key === callback.key) ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1 ); invokeCallback = 0; var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) (nameSoFar = children[i]), (type = nextNamePrefix + getElementKey(nameSoFar, i)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if (((i = getIteratorFn(children)), "function" === typeof i)) for ( children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) (nameSoFar = nameSoFar.value), (type = nextNamePrefix + getElementKey(nameSoFar, i++)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if ("object" === type) { if ("function" === typeof children.then) return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); array = String(children); throw Error( formatProdErrorMessage( 31, "[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array ) ); } return invokeCallback; } function mapChildren(children, func, context) { if (null == children) return children; var result = [], count = 0; mapIntoArray(children, result, "", "", function (child) { return func.call(context, child, count++); }); return result; } function lazyInitializer(payload) { if (-1 === payload._status) { var ctor = payload._result; ctor = ctor(); ctor.then( function (moduleObject) { if (0 === payload._status || -1 === payload._status) (payload._status = 1), (payload._result = moduleObject); }, function (error) { if (0 === payload._status || -1 === payload._status) (payload._status = 2), (payload._result = error); } ); -1 === payload._status && ((payload._status = 0), (payload._result = ctor)); } if (1 === payload._status) return payload._result.default; throw payload._result; } function createCacheRoot() { return new WeakMap(); } function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } exports.Children = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { mapChildren( children, function () { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function (children) { var n = 0; mapChildren(children, function () { n++; }); return n; }, toArray: function (children) { return ( mapChildren(children, function (child) { return child; }) || [] ); }, only: function (children) { if (!isValidElement(children)) throw Error(formatProdErrorMessage(143)); return children; } }; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; exports.cache = function (fn) { return function () { var dispatcher = ReactSharedInternals.A; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); void 0 === dispatcher && ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher)); fnMap = 0; for (var l = arguments.length; fnMap < l; fnMap++) { var arg = arguments[fnMap]; if ( "function" === typeof arg || ("object" === typeof arg && null !== arg) ) { var objectCache = dispatcher.o; null === objectCache && (dispatcher.o = objectCache = new WeakMap()); dispatcher = objectCache.get(arg); void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } else (objectCache = dispatcher.p), null === objectCache && (dispatcher.p = objectCache = new Map()), (dispatcher = objectCache.get(arg)), void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } if (1 === dispatcher.s) return dispatcher.v; if (2 === dispatcher.s) throw dispatcher.v; try { var result = fn.apply(null, arguments); fnMap = dispatcher; fnMap.s = 1; return (fnMap.v = result); } catch (error) { throw ((result = dispatcher), (result.s = 2), (result.v = error), error); } }; }; exports.cacheSignal = function () { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.cacheSignal() : null; }; exports.captureOwnerStack = function () { return null; }; exports.cloneElement = function (element, config, children) { if (null === element || void 0 === element) throw Error(formatProdErrorMessage(267, element)); var props = assign({}, element.props), key = element.key; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || ("ref" === propName && void 0 === config.ref) || (props[propName] = config[propName]); var propName = arguments.length - 2; if (1 === propName) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; exports.createElement = function (type, config, children) { var propName, props = {}, key = null; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (1 === childrenLength) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in ((childrenLength = type.defaultProps), childrenLength)) void 0 === props[propName] && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; exports.createRef = function () { return { current: null }; }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; }; exports.isValidElement = isValidElement; exports.lazy = function (ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; exports.memo = function (type, compare) { return { $$typeof: REACT_MEMO_TYPE, type: type, compare: void 0 === compare ? null : compare }; }; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); }; exports.useCallback = function (callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useDebugValue = function () {}; exports.useId = function () { return ReactSharedInternals.H.useId(); }; exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; exports.version = "19.2.0-canary-0bdb9206-20250818"; owebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware`_M!\!u!!!!!!!8"T"`"&(8(((((g,{,0 0Q0b00000M112(2p2222 33T3b333__webpack_unused_export__buffersourcesizemapshash}4var __webpack_unused_export__; /** * @license React * react.react-server.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactSharedInternals = { H: null, A: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { url += "?args[]=" + encodeURIComponent(arguments[1]); for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]); } return ( "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var isArrayImpl = Array.isArray; function noop() {} var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; maybeIterable = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } var hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: void 0 !== refProp ? refProp : null, props: props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return ( "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE ); } function escape(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return ( "$" + key.replace(/[=:]/g, function (match) { return escaperLookup[match]; }) ); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch ( ("string" === typeof thenable.status ? thenable.then(noop, noop) : ((thenable.status = "pending"), thenable.then( function (fulfilledValue) { "pending" === thenable.status && ((thenable.status = "fulfilled"), (thenable.value = fulfilledValue)); }, function (error) { "pending" === thenable.status && ((thenable.status = "rejected"), (thenable.reason = error)); } )), thenable.status) ) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if ("undefined" === type || "boolean" === type) children = null; var invokeCallback = !1; if (null === children) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return ( (invokeCallback = children._init), mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ) ); } } if (invokeCallback) return ( (callback = callback(children)), (invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar), isArrayImpl(callback) ? ((escapedPrefix = ""), null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) { return c; })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (null == callback.key || (children && children.key === callback.key) ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1 ); invokeCallback = 0; var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) (nameSoFar = children[i]), (type = nextNamePrefix + getElementKey(nameSoFar, i)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if (((i = getIteratorFn(children)), "function" === typeof i)) for ( children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) (nameSoFar = nameSoFar.value), (type = nextNamePrefix + getElementKey(nameSoFar, i++)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if ("object" === type) { if ("function" === typeof children.then) return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); array = String(children); throw Error( formatProdErrorMessage( 31, "[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array ) ); } return invokeCallback; } function mapChildren(children, func, context) { if (null == children) return children; var result = [], count = 0; mapIntoArray(children, result, "", "", function (child) { return func.call(context, child, count++); }); return result; } function lazyInitializer(payload) { if (-1 === payload._status) { var ctor = payload._result; ctor = ctor(); ctor.then( function (moduleObject) { if (0 === payload._status || -1 === payload._status) (payload._status = 1), (payload._result = moduleObject); }, function (error) { if (0 === payload._status || -1 === payload._status) (payload._status = 2), (payload._result = error); } ); -1 === payload._status && ((payload._status = 0), (payload._result = ctor)); } if (1 === payload._status) return payload._result.default; throw payload._result; } function createCacheRoot() { return new WeakMap(); } function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } __webpack_unused_export__ = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { mapChildren( children, function () { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function (children) { var n = 0; mapChildren(children, function () { n++; }); return n; }, toArray: function (children) { return ( mapChildren(children, function (child) { return child; }) || [] ); }, only: function (children) { if (!isValidElement(children)) throw Error(formatProdErrorMessage(143)); return children; } }; __webpack_unused_export__ = REACT_FRAGMENT_TYPE; __webpack_unused_export__ = REACT_PROFILER_TYPE; __webpack_unused_export__ = REACT_STRICT_MODE_TYPE; __webpack_unused_export__ = REACT_SUSPENSE_TYPE; __webpack_unused_export__ = ReactSharedInternals; __webpack_unused_export__ = function (fn) { return function () { var dispatcher = ReactSharedInternals.A; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); void 0 === dispatcher && ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher)); fnMap = 0; for (var l = arguments.length; fnMap < l; fnMap++) { var arg = arguments[fnMap]; if ( "function" === typeof arg || ("object" === typeof arg && null !== arg) ) { var objectCache = dispatcher.o; null === objectCache && (dispatcher.o = objectCache = new WeakMap()); dispatcher = objectCache.get(arg); void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } else (objectCache = dispatcher.p), null === objectCache && (dispatcher.p = objectCache = new Map()), (dispatcher = objectCache.get(arg)), void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } if (1 === dispatcher.s) return dispatcher.v; if (2 === dispatcher.s) throw dispatcher.v; try { var result = fn.apply(null, arguments); fnMap = dispatcher; fnMap.s = 1; return (fnMap.v = result); } catch (error) { throw ((result = dispatcher), (result.s = 2), (result.v = error), error); } }; }; __webpack_unused_export__ = function () { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.cacheSignal() : null; }; __webpack_unused_export__ = function () { return null; }; __webpack_unused_export__ = function (element, config, children) { if (null === element || void 0 === element) throw Error(formatProdErrorMessage(267, element)); var props = assign({}, element.props), key = element.key; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || ("ref" === propName && void 0 === config.ref) || (props[propName] = config[propName]); var propName = arguments.length - 2; if (1 === propName) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; __webpack_unused_export__ = function (type, config, children) { var propName, props = {}, key = null; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (1 === childrenLength) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in ((childrenLength = type.defaultProps), childrenLength)) void 0 === props[propName] && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; __webpack_unused_export__ = function () { return { current: null }; }; __webpack_unused_export__ = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; }; __webpack_unused_export__ = isValidElement; __webpack_unused_export__ = function (ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; __webpack_unused_export__ = function (type, compare) { return { $$typeof: REACT_MEMO_TYPE, type: type, compare: void 0 === compare ? null : compare }; }; __webpack_unused_export__ = function (usable) { return ReactSharedInternals.H.use(usable); }; __webpack_unused_export__ = function (callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; __webpack_unused_export__ = function () {}; __webpack_unused_export__ = function () { return ReactSharedInternals.H.useId(); }; __webpack_unused_export__ = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; __webpack_unused_export__ = "19.2.0-canary-0bdb9206-20250818"; {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesx ;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;AACb,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,yBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yBAAgB;AAChB,yBAAgB;AAChB,yBAAkB;AAClB,yBAAgB;AAChB,yBAAuE;AACvE;AACA,yBAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yBAAmB;AACnB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAoB;AACpB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA,yBAAqB;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oBAAoB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAiB;AACjB,WAAW;AACX;AACA,yBAAkB;AAClB,WAAW;AACX;AACA,yBAAsB;AACtB,yBAAY;AACZ;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA,yBAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,yBAAW;AACX;AACA;AACA,yBAAmB;AACnB;AACA;AACA,yBAAqB;AACrB,yBAAa;AACb;AACA;AACA,yBAAe;AACf;AACA;AACA,yBAAeowebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware3/** * @license React * react.react-server.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict"; var ReactSharedInternals = { H: null, A: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { url += "?args[]=" + encodeURIComponent(arguments[1]); for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]); } return ( "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var isArrayImpl = Array.isArray; function noop() {} var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; maybeIterable = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } var hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: void 0 !== refProp ? refProp : null, props: props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return ( "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE ); } function escape(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return ( "$" + key.replace(/[=:]/g, function (match) { return escaperLookup[match]; }) ); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch ( ("string" === typeof thenable.status ? thenable.then(noop, noop) : ((thenable.status = "pending"), thenable.then( function (fulfilledValue) { "pending" === thenable.status && ((thenable.status = "fulfilled"), (thenable.value = fulfilledValue)); }, function (error) { "pending" === thenable.status && ((thenable.status = "rejected"), (thenable.reason = error)); } )), thenable.status) ) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if ("undefined" === type || "boolean" === type) children = null; var invokeCallback = !1; if (null === children) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return ( (invokeCallback = children._init), mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ) ); } } if (invokeCallback) return ( (callback = callback(children)), (invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar), isArrayImpl(callback) ? ((escapedPrefix = ""), null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) { return c; })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (null == callback.key || (children && children.key === callback.key) ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1 ); invokeCallback = 0; var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) (nameSoFar = children[i]), (type = nextNamePrefix + getElementKey(nameSoFar, i)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if (((i = getIteratorFn(children)), "function" === typeof i)) for ( children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) (nameSoFar = nameSoFar.value), (type = nextNamePrefix + getElementKey(nameSoFar, i++)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if ("object" === type) { if ("function" === typeof children.then) return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); array = String(children); throw Error( formatProdErrorMessage( 31, "[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array ) ); } return invokeCallback; } function mapChildren(children, func, context) { if (null == children) return children; var result = [], count = 0; mapIntoArray(children, result, "", "", function (child) { return func.call(context, child, count++); }); return result; } function lazyInitializer(payload) { if (-1 === payload._status) { var ctor = payload._result; ctor = ctor(); ctor.then( function (moduleObject) { if (0 === payload._status || -1 === payload._status) (payload._status = 1), (payload._result = moduleObject); }, function (error) { if (0 === payload._status || -1 === payload._status) (payload._status = 2), (payload._result = error); } ); -1 === payload._status && ((payload._status = 0), (payload._result = ctor)); } if (1 === payload._status) return payload._result.default; throw payload._result; } function createCacheRoot() { return new WeakMap(); } function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } exports.Children = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { mapChildren( children, function () { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function (children) { var n = 0; mapChildren(children, function () { n++; }); return n; }, toArray: function (children) { return ( mapChildren(children, function (child) { return child; }) || [] ); }, only: function (children) { if (!isValidElement(children)) throw Error(formatProdErrorMessage(143)); return children; } }; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; exports.cache = function (fn) { return function () { var dispatcher = ReactSharedInternals.A; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); void 0 === dispatcher && ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher)); fnMap = 0; for (var l = arguments.length; fnMap < l; fnMap++) { var arg = arguments[fnMap]; if ( "function" === typeof arg || ("object" === typeof arg && null !== arg) ) { var objectCache = dispatcher.o; null === objectCache && (dispatcher.o = objectCache = new WeakMap()); dispatcher = objectCache.get(arg); void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } else (objectCache = dispatcher.p), null === objectCache && (dispatcher.p = objectCache = new Map()), (dispatcher = objectCache.get(arg)), void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } if (1 === dispatcher.s) return dispatcher.v; if (2 === dispatcher.s) throw dispatcher.v; try { var result = fn.apply(null, arguments); fnMap = dispatcher; fnMap.s = 1; return (fnMap.v = result); } catch (error) { throw ((result = dispatcher), (result.s = 2), (result.v = error), error); } }; }; exports.cacheSignal = function () { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.cacheSignal() : null; }; exports.captureOwnerStack = function () { return null; }; exports.cloneElement = function (element, config, children) { if (null === element || void 0 === element) throw Error(formatProdErrorMessage(267, element)); var props = assign({}, element.props), key = element.key; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || ("ref" === propName && void 0 === config.ref) || (props[propName] = config[propName]); var propName = arguments.length - 2; if (1 === propName) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; exports.createElement = function (type, config, children) { var propName, props = {}, key = null; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (1 === childrenLength) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in ((childrenLength = type.defaultProps), childrenLength)) void 0 === props[propName] && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; exports.createRef = function () { return { current: null }; }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; }; exports.isValidElement = isValidElement; exports.lazy = function (ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; exports.memo = function (type, compare) { return { $$typeof: REACT_MEMO_TYPE, type: type, compare: void 0 === compare ? null : compare }; }; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); }; exports.useCallback = function (callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useDebugValue = function () {}; exports.useId = function () { return ReactSharedInternals.H.useId(); }; exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; exports.version = "19.2.0-canary-0bdb9206-20250818"; ConcatSourceRawSourcevar __webpack_unused_export__; ReplaceSourceOriginalSource8webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware249261undefined78827897__webpack_unused_export__undefined85258540__webpack_unused_export__undefined85658580__webpack_unused_export__undefined86058622__webpack_unused_export__undefined86508665__webpack_unused_export__undefined86908760__webpack_unused_export__undefined87888800__webpack_unused_export__undefined1027810296__webpack_unused_export__undefined1041510439__webpack_unused_export__undefined1047510494__webpack_unused_export__undefined1136711387__webpack_unused_export__undefined1230412320__webpack_unused_export__undefined1236912386__webpack_unused_export__undefined1247612497__webpack_unused_export__undefined1251712528__webpack_unused_export__undefined1267312684__webpack_unused_export__undefined1283012840__webpack_unused_export__undefined1291212930__webpack_unused_export__undefined1302613046__webpack_unused_export__undefined1306613078__webpack_unused_export__undefined1314013154__webpack_unused_export__undefined1324213256__webpack_unused_export__undefined /***/ }) C4/***/ ((__unused_webpack_module, exports) => { "use strict"; var __webpack_unused_export__; /** * @license React * react.react-server.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactSharedInternals = { H: null, A: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { url += "?args[]=" + encodeURIComponent(arguments[1]); for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]); } return ( "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var isArrayImpl = Array.isArray; function noop() {} var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; maybeIterable = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } var hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: void 0 !== refProp ? refProp : null, props: props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return ( "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE ); } function escape(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return ( "$" + key.replace(/[=:]/g, function (match) { return escaperLookup[match]; }) ); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch ( ("string" === typeof thenable.status ? thenable.then(noop, noop) : ((thenable.status = "pending"), thenable.then( function (fulfilledValue) { "pending" === thenable.status && ((thenable.status = "fulfilled"), (thenable.value = fulfilledValue)); }, function (error) { "pending" === thenable.status && ((thenable.status = "rejected"), (thenable.reason = error)); } )), thenable.status) ) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if ("undefined" === type || "boolean" === type) children = null; var invokeCallback = !1; if (null === children) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return ( (invokeCallback = children._init), mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ) ); } } if (invokeCallback) return ( (callback = callback(children)), (invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar), isArrayImpl(callback) ? ((escapedPrefix = ""), null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) { return c; })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (null == callback.key || (children && children.key === callback.key) ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1 ); invokeCallback = 0; var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) (nameSoFar = children[i]), (type = nextNamePrefix + getElementKey(nameSoFar, i)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if (((i = getIteratorFn(children)), "function" === typeof i)) for ( children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) (nameSoFar = nameSoFar.value), (type = nextNamePrefix + getElementKey(nameSoFar, i++)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if ("object" === type) { if ("function" === typeof children.then) return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); array = String(children); throw Error( formatProdErrorMessage( 31, "[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array ) ); } return invokeCallback; } function mapChildren(children, func, context) { if (null == children) return children; var result = [], count = 0; mapIntoArray(children, result, "", "", function (child) { return func.call(context, child, count++); }); return result; } function lazyInitializer(payload) { if (-1 === payload._status) { var ctor = payload._result; ctor = ctor(); ctor.then( function (moduleObject) { if (0 === payload._status || -1 === payload._status) (payload._status = 1), (payload._result = moduleObject); }, function (error) { if (0 === payload._status || -1 === payload._status) (payload._status = 2), (payload._result = error); } ); -1 === payload._status && ((payload._status = 0), (payload._result = ctor)); } if (1 === payload._status) return payload._result.default; throw payload._result; } function createCacheRoot() { return new WeakMap(); } function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } __webpack_unused_export__ = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { mapChildren( children, function () { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function (children) { var n = 0; mapChildren(children, function () { n++; }); return n; }, toArray: function (children) { return ( mapChildren(children, function (child) { return child; }) || [] ); }, only: function (children) { if (!isValidElement(children)) throw Error(formatProdErrorMessage(143)); return children; } }; __webpack_unused_export__ = REACT_FRAGMENT_TYPE; __webpack_unused_export__ = REACT_PROFILER_TYPE; __webpack_unused_export__ = REACT_STRICT_MODE_TYPE; __webpack_unused_export__ = REACT_SUSPENSE_TYPE; __webpack_unused_export__ = ReactSharedInternals; __webpack_unused_export__ = function (fn) { return function () { var dispatcher = ReactSharedInternals.A; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); void 0 === dispatcher && ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher)); fnMap = 0; for (var l = arguments.length; fnMap < l; fnMap++) { var arg = arguments[fnMap]; if ( "function" === typeof arg || ("object" === typeof arg && null !== arg) ) { var objectCache = dispatcher.o; null === objectCache && (dispatcher.o = objectCache = new WeakMap()); dispatcher = objectCache.get(arg); void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } else (objectCache = dispatcher.p), null === objectCache && (dispatcher.p = objectCache = new Map()), (dispatcher = objectCache.get(arg)), void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } if (1 === dispatcher.s) return dispatcher.v; if (2 === dispatcher.s) throw dispatcher.v; try { var result = fn.apply(null, arguments); fnMap = dispatcher; fnMap.s = 1; return (fnMap.v = result); } catch (error) { throw ((result = dispatcher), (result.s = 2), (result.v = error), error); } }; }; __webpack_unused_export__ = function () { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.cacheSignal() : null; }; __webpack_unused_export__ = function () { return null; }; __webpack_unused_export__ = function (element, config, children) { if (null === element || void 0 === element) throw Error(formatProdErrorMessage(267, element)); var props = assign({}, element.props), key = element.key; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || ("ref" === propName && void 0 === config.ref) || (props[propName] = config[propName]); var propName = arguments.length - 2; if (1 === propName) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; __webpack_unused_export__ = function (type, config, children) { var propName, props = {}, key = null; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (1 === childrenLength) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in ((childrenLength = type.defaultProps), childrenLength)) void 0 === props[propName] && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; __webpack_unused_export__ = function () { return { current: null }; }; __webpack_unused_export__ = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; }; __webpack_unused_export__ = isValidElement; __webpack_unused_export__ = function (ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; __webpack_unused_export__ = function (type, compare) { return { $$typeof: REACT_MEMO_TYPE, type: type, compare: void 0 === compare ? null : compare }; }; __webpack_unused_export__ = function (usable) { return ReactSharedInternals.H.use(usable); }; __webpack_unused_export__ = function (callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; __webpack_unused_export__ = function () {}; __webpack_unused_export__ = function () { return ReactSharedInternals.H.useId(); }; __webpack_unused_export__ = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; __webpack_unused_export__ = "19.2.0-canary-0bdb9206-20250818"; /***/ }) DGNx ;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;AACb,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,yBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yBAAgB;AAChB,yBAAgB;AAChB,yBAAkB;AAClB,yBAAgB;AAChB,yBAAuE;AACvE;AACA,yBAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yBAAmB;AACnB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAoB;AACpB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA,yBAAqB;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oBAAoB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAiB;AACjB,WAAW;AACX;AACA,yBAAkB;AAClB,WAAW;AACX;AACA,yBAAsB;AACtB,yBAAY;AACZ;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA,yBAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,yBAAW;AACX;AACA;AACA,yBAAmB;AACnB;AACA;AACA,yBAAqB;AACrB,yBAAa;AACb;AACA;AACA,yBAAe;AACf;AACA;AACA,yBAAeowebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware3/** * @license React * react.react-server.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict"; var ReactSharedInternals = { H: null, A: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { url += "?args[]=" + encodeURIComponent(arguments[1]); for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]); } return ( "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var isArrayImpl = Array.isArray; function noop() {} var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; maybeIterable = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } var hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: void 0 !== refProp ? refProp : null, props: props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return ( "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE ); } function escape(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return ( "$" + key.replace(/[=:]/g, function (match) { return escaperLookup[match]; }) ); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch ( ("string" === typeof thenable.status ? thenable.then(noop, noop) : ((thenable.status = "pending"), thenable.then( function (fulfilledValue) { "pending" === thenable.status && ((thenable.status = "fulfilled"), (thenable.value = fulfilledValue)); }, function (error) { "pending" === thenable.status && ((thenable.status = "rejected"), (thenable.reason = error)); } )), thenable.status) ) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if ("undefined" === type || "boolean" === type) children = null; var invokeCallback = !1; if (null === children) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return ( (invokeCallback = children._init), mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ) ); } } if (invokeCallback) return ( (callback = callback(children)), (invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar), isArrayImpl(callback) ? ((escapedPrefix = ""), null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) { return c; })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (null == callback.key || (children && children.key === callback.key) ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1 ); invokeCallback = 0; var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) (nameSoFar = children[i]), (type = nextNamePrefix + getElementKey(nameSoFar, i)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if (((i = getIteratorFn(children)), "function" === typeof i)) for ( children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) (nameSoFar = nameSoFar.value), (type = nextNamePrefix + getElementKey(nameSoFar, i++)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if ("object" === type) { if ("function" === typeof children.then) return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); array = String(children); throw Error( formatProdErrorMessage( 31, "[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array ) ); } return invokeCallback; } function mapChildren(children, func, context) { if (null == children) return children; var result = [], count = 0; mapIntoArray(children, result, "", "", function (child) { return func.call(context, child, count++); }); return result; } function lazyInitializer(payload) { if (-1 === payload._status) { var ctor = payload._result; ctor = ctor(); ctor.then( function (moduleObject) { if (0 === payload._status || -1 === payload._status) (payload._status = 1), (payload._result = moduleObject); }, function (error) { if (0 === payload._status || -1 === payload._status) (payload._status = 2), (payload._result = error); } ); -1 === payload._status && ((payload._status = 0), (payload._result = ctor)); } if (1 === payload._status) return payload._result.default; throw payload._result; } function createCacheRoot() { return new WeakMap(); } function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } exports.Children = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { mapChildren( children, function () { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function (children) { var n = 0; mapChildren(children, function () { n++; }); return n; }, toArray: function (children) { return ( mapChildren(children, function (child) { return child; }) || [] ); }, only: function (children) { if (!isValidElement(children)) throw Error(formatProdErrorMessage(143)); return children; } }; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; exports.cache = function (fn) { return function () { var dispatcher = ReactSharedInternals.A; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); void 0 === dispatcher && ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher)); fnMap = 0; for (var l = arguments.length; fnMap < l; fnMap++) { var arg = arguments[fnMap]; if ( "function" === typeof arg || ("object" === typeof arg && null !== arg) ) { var objectCache = dispatcher.o; null === objectCache && (dispatcher.o = objectCache = new WeakMap()); dispatcher = objectCache.get(arg); void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } else (objectCache = dispatcher.p), null === objectCache && (dispatcher.p = objectCache = new Map()), (dispatcher = objectCache.get(arg)), void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } if (1 === dispatcher.s) return dispatcher.v; if (2 === dispatcher.s) throw dispatcher.v; try { var result = fn.apply(null, arguments); fnMap = dispatcher; fnMap.s = 1; return (fnMap.v = result); } catch (error) { throw ((result = dispatcher), (result.s = 2), (result.v = error), error); } }; }; exports.cacheSignal = function () { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.cacheSignal() : null; }; exports.captureOwnerStack = function () { return null; }; exports.cloneElement = function (element, config, children) { if (null === element || void 0 === element) throw Error(formatProdErrorMessage(267, element)); var props = assign({}, element.props), key = element.key; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || ("ref" === propName && void 0 === config.ref) || (props[propName] = config[propName]); var propName = arguments.length - 2; if (1 === propName) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; exports.createElement = function (type, config, children) { var propName, props = {}, key = null; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (1 === childrenLength) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in ((childrenLength = type.defaultProps), childrenLength)) void 0 === props[propName] && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; exports.createRef = function () { return { current: null }; }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; }; exports.isValidElement = isValidElement; exports.lazy = function (ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; exports.memo = function (type, compare) { return { $$typeof: REACT_MEMO_TYPE, type: type, compare: void 0 === compare ? null : compare }; }; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); }; exports.useCallback = function (callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useDebugValue = function () {}; exports.useId = function () { return ReactSharedInternals.H.useId(); }; exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; exports.version = "19.2.0-canary-0bdb9206-20250818";  O>/***/ ((__unused_webpack_module, exports) => { "use strict"; Nvar __webpack_unused_export__; P8webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware249261undefined78827897__webpack_unused_export__undefined85258540__webpack_unused_export__undefined85658580__webpack_unused_export__undefined86058622__webpack_unused_export__undefined86508665__webpack_unused_export__undefined86908760__webpack_unused_export__undefined87888800__webpack_unused_export__undefined1027810296__webpack_unused_export__undefined1041510439__webpack_unused_export__undefined1047510494__webpack_unused_export__undefined1136711387__webpack_unused_export__undefined1230412320__webpack_unused_export__undefined1236912386__webpack_unused_export__undefined1247612497__webpack_unused_export__undefined1251712528__webpack_unused_export__undefined1267312684__webpack_unused_export__undefined1283012840__webpack_unused_export__undefined1291212930__webpack_unused_export__undefined1302613046__webpack_unused_export__undefined1306613078__webpack_unused_export__undefined1314013154__webpack_unused_export__undefined1324213256__webpack_unused_export__undefinedQR, /***/ 443:  awebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource 1+webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource)"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { RequestCookies: () => RequestCookies, ResponseCookies: () => ResponseCookies, parseCookie: () => parseCookie, parseSetCookie: () => parseSetCookie, stringifyCookie: () => stringifyCookie }); module.exports = __toCommonJS(src_exports); // src/serialize.ts function stringifyCookie(c) { var _a; const attrs = [ "path" in c && c.path && `Path=${c.path}`, "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, "domain" in c && c.domain && `Domain=${c.domain}`, "secure" in c && c.secure && "Secure", "httpOnly" in c && c.httpOnly && "HttpOnly", "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, "partitioned" in c && c.partitioned && "Partitioned", "priority" in c && c.priority && `Priority=${c.priority}` ].filter(Boolean); const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; } function parseCookie(cookie) { const map = /* @__PURE__ */ new Map(); for (const pair of cookie.split(/; */)) { if (!pair) continue; const splitAt = pair.indexOf("="); if (splitAt === -1) { map.set(pair, "true"); continue; } const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; try { map.set(key, decodeURIComponent(value != null ? value : "true")); } catch { } } return map; } function parseSetCookie(setCookie) { if (!setCookie) { return void 0; } const [[name, value], ...attributes] = parseCookie(setCookie); const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries( attributes.map(([key, value2]) => [ key.toLowerCase().replace(/-/g, ""), value2 ]) ); const cookie = { name, value: decodeURIComponent(value), domain, ...expires && { expires: new Date(expires) }, ...httponly && { httpOnly: true }, ...typeof maxage === "string" && { maxAge: Number(maxage) }, path, ...samesite && { sameSite: parseSameSite(samesite) }, ...secure && { secure: true }, ...priority && { priority: parsePriority(priority) }, ...partitioned && { partitioned: true } }; return compact(cookie); } function compact(t) { const newT = {}; for (const key in t) { if (t[key]) { newT[key] = t[key]; } } return newT; } var SAME_SITE = ["strict", "lax", "none"]; function parseSameSite(string) { string = string.toLowerCase(); return SAME_SITE.includes(string) ? string : void 0; } var PRIORITY = ["low", "medium", "high"]; function parsePriority(string) { string = string.toLowerCase(); return PRIORITY.includes(string) ? string : void 0; } function splitCookiesString(cookiesString) { if (!cookiesString) return []; var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { cookiesSeparatorFound = true; pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // src/request-cookies.ts var RequestCookies = class { constructor(requestHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); this._headers = requestHeaders; const header = requestHeaders.get("cookie"); if (header) { const parsed = parseCookie(header); for (const [name, value] of parsed) { this._parsed.set(name, { name, value }); } } } [Symbol.iterator]() { return this._parsed[Symbol.iterator](); } /** * The amount of cookies received from the client */ get size() { return this._parsed.size; } get(...args) { const name = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(name); } getAll(...args) { var _a; const all = Array.from(this._parsed); if (!args.length) { return all.map(([_, value]) => value); } const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter(([n]) => n === name).map(([_, value]) => value); } has(name) { return this._parsed.has(name); } set(...args) { const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; const map = this._parsed; map.set(name, { name, value }); this._headers.set( "cookie", Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ") ); return this; } /** * Delete the cookies matching the passed name or names in the request. */ delete(names) { const map = this._parsed; const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); this._headers.set( "cookie", Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ") ); return result; } /** * Delete all the cookies in the cookies in the request. */ clear() { this.delete(Array.from(this._parsed.keys())); return this; } /** * Format the cookies in the request as a string for logging */ [Symbol.for("edge-runtime.inspect.custom")]() { return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); } }; // src/response-cookies.ts var ResponseCookies = class { constructor(responseHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); var _a, _b, _c; this._headers = responseHeaders; const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString); if (parsed) this._parsed.set(parsed.name, parsed); } } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. */ get(...args) { const key = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(key); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. */ getAll(...args) { var _a; const all = Array.from(this._parsed.values()); if (!args.length) { return all; } const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter((c) => c.name === key); } has(name) { return this._parsed.has(name); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. */ set(...args) { const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; const map = this._parsed; map.set(name, normalizeCookie({ name, value, ...cookie })); replace(map, this._headers); return this; } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. */ delete(...args) { const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]]; return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) }); } [Symbol.for("edge-runtime.inspect.custom")]() { return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map(stringifyCookie).join("; "); } }; function replace(bag, headers) { headers.delete("set-cookie"); for (const [, value] of bag) { const serialized = stringifyCookie(value); headers.append("set-cookie", serialized); } } function normalizeCookie(cookie = { name: "", value: "" }) { if (typeof cookie.expires === "number") { cookie.expires = new Date(cookie.expires); } if (cookie.maxAge) { cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); } if (cookie.path === null || cookie.path === void 0) { cookie.path = "/"; } return cookie; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { RequestCookies, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie }); cwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware` A()0buffersourcesizemapshash( var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { RequestCookies: () => RequestCookies, ResponseCookies: () => ResponseCookies, parseCookie: () => parseCookie, parseSetCookie: () => parseSetCookie, stringifyCookie: () => stringifyCookie }); module.exports = __toCommonJS(src_exports); // src/serialize.ts function stringifyCookie(c) { var _a; const attrs = [ "path" in c && c.path && `Path=${c.path}`, "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, "domain" in c && c.domain && `Domain=${c.domain}`, "secure" in c && c.secure && "Secure", "httpOnly" in c && c.httpOnly && "HttpOnly", "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, "partitioned" in c && c.partitioned && "Partitioned", "priority" in c && c.priority && `Priority=${c.priority}` ].filter(Boolean); const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; } function parseCookie(cookie) { const map = /* @__PURE__ */ new Map(); for (const pair of cookie.split(/; */)) { if (!pair) continue; const splitAt = pair.indexOf("="); if (splitAt === -1) { map.set(pair, "true"); continue; } const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; try { map.set(key, decodeURIComponent(value != null ? value : "true")); } catch { } } return map; } function parseSetCookie(setCookie) { if (!setCookie) { return void 0; } const [[name, value], ...attributes] = parseCookie(setCookie); const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries( attributes.map(([key, value2]) => [ key.toLowerCase().replace(/-/g, ""), value2 ]) ); const cookie = { name, value: decodeURIComponent(value), domain, ...expires && { expires: new Date(expires) }, ...httponly && { httpOnly: true }, ...typeof maxage === "string" && { maxAge: Number(maxage) }, path, ...samesite && { sameSite: parseSameSite(samesite) }, ...secure && { secure: true }, ...priority && { priority: parsePriority(priority) }, ...partitioned && { partitioned: true } }; return compact(cookie); } function compact(t) { const newT = {}; for (const key in t) { if (t[key]) { newT[key] = t[key]; } } return newT; } var SAME_SITE = ["strict", "lax", "none"]; function parseSameSite(string) { string = string.toLowerCase(); return SAME_SITE.includes(string) ? string : void 0; } var PRIORITY = ["low", "medium", "high"]; function parsePriority(string) { string = string.toLowerCase(); return PRIORITY.includes(string) ? string : void 0; } function splitCookiesString(cookiesString) { if (!cookiesString) return []; var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { cookiesSeparatorFound = true; pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // src/request-cookies.ts var RequestCookies = class { constructor(requestHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); this._headers = requestHeaders; const header = requestHeaders.get("cookie"); if (header) { const parsed = parseCookie(header); for (const [name, value] of parsed) { this._parsed.set(name, { name, value }); } } } [Symbol.iterator]() { return this._parsed[Symbol.iterator](); } /** * The amount of cookies received from the client */ get size() { return this._parsed.size; } get(...args) { const name = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(name); } getAll(...args) { var _a; const all = Array.from(this._parsed); if (!args.length) { return all.map(([_, value]) => value); } const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter(([n]) => n === name).map(([_, value]) => value); } has(name) { return this._parsed.has(name); } set(...args) { const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; const map = this._parsed; map.set(name, { name, value }); this._headers.set( "cookie", Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ") ); return this; } /** * Delete the cookies matching the passed name or names in the request. */ delete(names) { const map = this._parsed; const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); this._headers.set( "cookie", Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ") ); return result; } /** * Delete all the cookies in the cookies in the request. */ clear() { this.delete(Array.from(this._parsed.keys())); return this; } /** * Format the cookies in the request as a string for logging */ [Symbol.for("edge-runtime.inspect.custom")]() { return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); } }; // src/response-cookies.ts var ResponseCookies = class { constructor(responseHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); var _a, _b, _c; this._headers = responseHeaders; const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString); if (parsed) this._parsed.set(parsed.name, parsed); } } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. */ get(...args) { const key = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(key); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. */ getAll(...args) { var _a; const all = Array.from(this._parsed.values()); if (!args.length) { return all; } const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter((c) => c.name === key); } has(name) { return this._parsed.has(name); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. */ set(...args) { const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; const map = this._parsed; map.set(name, normalizeCookie({ name, value, ...cookie })); replace(map, this._headers); return this; } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. */ delete(...args) { const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]]; return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) }); } [Symbol.for("edge-runtime.inspect.custom")]() { return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map(stringifyCookie).join("; "); } }; function replace(bag, headers) { headers.delete("set-cookie"); for (const [, value] of bag) { const serialized = stringifyCookie(value); headers.append("set-cookie", serialized); } } function normalizeCookie(cookie = { name: "", value: "" }) { if (typeof cookie.expires === "number") { cookie.expires = new Date(cookie.expires); } if (cookie.maxAge) { cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); } if (cookie.path === null || cookie.path === void 0) { cookie.path = "/"; } return cookie; } // Annotate the CommonJS export names for ESM import in node: 0 && (0); {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesxAAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA,6BAA6B,4FAA4F;AACzH;AACA;AACA;AACA,oDAAoD,kBAAkB,aAAa;;AAEnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C,mEAAmE,gFAAgF;AACnJ,gEAAgE,SAAS;AACzE,2CAA2C,SAAS;AACpD;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA,iDAAiD,WAAW;AAC5D;AACA,yBAAyB,OAAO,GAAG,qDAAqD;AACxF,+CAA+C,cAAc,EAAE,cAAc,GAAG;AAChF;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD,qBAAqB,gBAAgB;AACrC,uCAAuC,wBAAwB;AAC/D;AACA,qBAAqB,mCAAmC;AACxD,mBAAmB,cAAc;AACjC,qBAAqB,mCAAmC;AACxD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA,4EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iDAAiD;AAC9E;AACA;AACA,oDAAoD,OAAO,GAAG,4BAA4B,WAAW;AACrG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA,sBAAsB,mEAAmE;AACzF;AACA;AACA,8BAA8B,iDAAiD;AAC/E;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAMLcwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware)"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { RequestCookies: () => RequestCookies, ResponseCookies: () => ResponseCookies, parseCookie: () => parseCookie, parseSetCookie: () => parseSetCookie, stringifyCookie: () => stringifyCookie }); module.exports = __toCommonJS(src_exports); // src/serialize.ts function stringifyCookie(c) { var _a; const attrs = [ "path" in c && c.path && `Path=${c.path}`, "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, "domain" in c && c.domain && `Domain=${c.domain}`, "secure" in c && c.secure && "Secure", "httpOnly" in c && c.httpOnly && "HttpOnly", "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, "partitioned" in c && c.partitioned && "Partitioned", "priority" in c && c.priority && `Priority=${c.priority}` ].filter(Boolean); const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; } function parseCookie(cookie) { const map = /* @__PURE__ */ new Map(); for (const pair of cookie.split(/; */)) { if (!pair) continue; const splitAt = pair.indexOf("="); if (splitAt === -1) { map.set(pair, "true"); continue; } const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; try { map.set(key, decodeURIComponent(value != null ? value : "true")); } catch { } } return map; } function parseSetCookie(setCookie) { if (!setCookie) { return void 0; } const [[name, value], ...attributes] = parseCookie(setCookie); const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries( attributes.map(([key, value2]) => [ key.toLowerCase().replace(/-/g, ""), value2 ]) ); const cookie = { name, value: decodeURIComponent(value), domain, ...expires && { expires: new Date(expires) }, ...httponly && { httpOnly: true }, ...typeof maxage === "string" && { maxAge: Number(maxage) }, path, ...samesite && { sameSite: parseSameSite(samesite) }, ...secure && { secure: true }, ...priority && { priority: parsePriority(priority) }, ...partitioned && { partitioned: true } }; return compact(cookie); } function compact(t) { const newT = {}; for (const key in t) { if (t[key]) { newT[key] = t[key]; } } return newT; } var SAME_SITE = ["strict", "lax", "none"]; function parseSameSite(string) { string = string.toLowerCase(); return SAME_SITE.includes(string) ? string : void 0; } var PRIORITY = ["low", "medium", "high"]; function parsePriority(string) { string = string.toLowerCase(); return PRIORITY.includes(string) ? string : void 0; } function splitCookiesString(cookiesString) { if (!cookiesString) return []; var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { cookiesSeparatorFound = true; pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // src/request-cookies.ts var RequestCookies = class { constructor(requestHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); this._headers = requestHeaders; const header = requestHeaders.get("cookie"); if (header) { const parsed = parseCookie(header); for (const [name, value] of parsed) { this._parsed.set(name, { name, value }); } } } [Symbol.iterator]() { return this._parsed[Symbol.iterator](); } /** * The amount of cookies received from the client */ get size() { return this._parsed.size; } get(...args) { const name = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(name); } getAll(...args) { var _a; const all = Array.from(this._parsed); if (!args.length) { return all.map(([_, value]) => value); } const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter(([n]) => n === name).map(([_, value]) => value); } has(name) { return this._parsed.has(name); } set(...args) { const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; const map = this._parsed; map.set(name, { name, value }); this._headers.set( "cookie", Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ") ); return this; } /** * Delete the cookies matching the passed name or names in the request. */ delete(names) { const map = this._parsed; const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); this._headers.set( "cookie", Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ") ); return result; } /** * Delete all the cookies in the cookies in the request. */ clear() { this.delete(Array.from(this._parsed.keys())); return this; } /** * Format the cookies in the request as a string for logging */ [Symbol.for("edge-runtime.inspect.custom")]() { return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); } }; // src/response-cookies.ts var ResponseCookies = class { constructor(responseHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); var _a, _b, _c; this._headers = responseHeaders; const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString); if (parsed) this._parsed.set(parsed.name, parsed); } } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. */ get(...args) { const key = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(key); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. */ getAll(...args) { var _a; const all = Array.from(this._parsed.values()); if (!args.length) { return all; } const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter((c) => c.name === key); } has(name) { return this._parsed.has(name); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. */ set(...args) { const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; const map = this._parsed; map.set(name, normalizeCookie({ name, value, ...cookie })); replace(map, this._headers); return this; } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. */ delete(...args) { const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]]; return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) }); } [Symbol.for("edge-runtime.inspect.custom")]() { return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map(stringifyCookie).join("; "); } }; function replace(bag, headers) { headers.delete("set-cookie"); for (const [, value] of bag) { const serialized = stringifyCookie(value); headers.append("set-cookie", serialized); } } function normalizeCookie(cookie = { name: "", value: "" }) { if (typeof cookie.expires === "number") { cookie.expires = new Date(cookie.expires); } if (cookie.maxAge) { cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); } if (cookie.path === null || cookie.path === void 0) { cookie.path = "/"; } return cookie; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { RequestCookies, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie }); ReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware012undefined10408105150undefined /***/ }) 1(/***/ ((module) => { "use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { RequestCookies: () => RequestCookies, ResponseCookies: () => ResponseCookies, parseCookie: () => parseCookie, parseSetCookie: () => parseSetCookie, stringifyCookie: () => stringifyCookie }); module.exports = __toCommonJS(src_exports); // src/serialize.ts function stringifyCookie(c) { var _a; const attrs = [ "path" in c && c.path && `Path=${c.path}`, "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, "domain" in c && c.domain && `Domain=${c.domain}`, "secure" in c && c.secure && "Secure", "httpOnly" in c && c.httpOnly && "HttpOnly", "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, "partitioned" in c && c.partitioned && "Partitioned", "priority" in c && c.priority && `Priority=${c.priority}` ].filter(Boolean); const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; } function parseCookie(cookie) { const map = /* @__PURE__ */ new Map(); for (const pair of cookie.split(/; */)) { if (!pair) continue; const splitAt = pair.indexOf("="); if (splitAt === -1) { map.set(pair, "true"); continue; } const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; try { map.set(key, decodeURIComponent(value != null ? value : "true")); } catch { } } return map; } function parseSetCookie(setCookie) { if (!setCookie) { return void 0; } const [[name, value], ...attributes] = parseCookie(setCookie); const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries( attributes.map(([key, value2]) => [ key.toLowerCase().replace(/-/g, ""), value2 ]) ); const cookie = { name, value: decodeURIComponent(value), domain, ...expires && { expires: new Date(expires) }, ...httponly && { httpOnly: true }, ...typeof maxage === "string" && { maxAge: Number(maxage) }, path, ...samesite && { sameSite: parseSameSite(samesite) }, ...secure && { secure: true }, ...priority && { priority: parsePriority(priority) }, ...partitioned && { partitioned: true } }; return compact(cookie); } function compact(t) { const newT = {}; for (const key in t) { if (t[key]) { newT[key] = t[key]; } } return newT; } var SAME_SITE = ["strict", "lax", "none"]; function parseSameSite(string) { string = string.toLowerCase(); return SAME_SITE.includes(string) ? string : void 0; } var PRIORITY = ["low", "medium", "high"]; function parsePriority(string) { string = string.toLowerCase(); return PRIORITY.includes(string) ? string : void 0; } function splitCookiesString(cookiesString) { if (!cookiesString) return []; var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { cookiesSeparatorFound = true; pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // src/request-cookies.ts var RequestCookies = class { constructor(requestHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); this._headers = requestHeaders; const header = requestHeaders.get("cookie"); if (header) { const parsed = parseCookie(header); for (const [name, value] of parsed) { this._parsed.set(name, { name, value }); } } } [Symbol.iterator]() { return this._parsed[Symbol.iterator](); } /** * The amount of cookies received from the client */ get size() { return this._parsed.size; } get(...args) { const name = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(name); } getAll(...args) { var _a; const all = Array.from(this._parsed); if (!args.length) { return all.map(([_, value]) => value); } const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter(([n]) => n === name).map(([_, value]) => value); } has(name) { return this._parsed.has(name); } set(...args) { const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; const map = this._parsed; map.set(name, { name, value }); this._headers.set( "cookie", Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ") ); return this; } /** * Delete the cookies matching the passed name or names in the request. */ delete(names) { const map = this._parsed; const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); this._headers.set( "cookie", Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ") ); return result; } /** * Delete all the cookies in the cookies in the request. */ clear() { this.delete(Array.from(this._parsed.keys())); return this; } /** * Format the cookies in the request as a string for logging */ [Symbol.for("edge-runtime.inspect.custom")]() { return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); } }; // src/response-cookies.ts var ResponseCookies = class { constructor(responseHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); var _a, _b, _c; this._headers = responseHeaders; const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString); if (parsed) this._parsed.set(parsed.name, parsed); } } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. */ get(...args) { const key = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(key); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. */ getAll(...args) { var _a; const all = Array.from(this._parsed.values()); if (!args.length) { return all; } const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter((c) => c.name === key); } has(name) { return this._parsed.has(name); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. */ set(...args) { const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; const map = this._parsed; map.set(name, normalizeCookie({ name, value, ...cookie })); replace(map, this._headers); return this; } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. */ delete(...args) { const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]]; return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) }); } [Symbol.for("edge-runtime.inspect.custom")]() { return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map(stringifyCookie).join("; "); } }; function replace(bag, headers) { headers.delete("set-cookie"); for (const [, value] of bag) { const serialized = stringifyCookie(value); headers.append("set-cookie", serialized); } } function normalizeCookie(cookie = { name: "", value: "" }) { if (typeof cookie.expires === "number") { cookie.expires = new Date(cookie.expires); } if (cookie.maxAge) { cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); } if (cookie.path === null || cookie.path === void 0) { cookie.path = "/"; } return cookie; } // Annotate the CommonJS export names for ESM import in node: 0 && (0); /***/ }) 25<x;;;AAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA,6BAA6B,4FAA4F;AACzH;AACA;AACA;AACA,oDAAoD,kBAAkB,aAAa;;AAEnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C,mEAAmE,gFAAgF;AACnJ,gEAAgE,SAAS;AACzE,2CAA2C,SAAS;AACpD;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA,iDAAiD,WAAW;AAC5D;AACA,yBAAyB,OAAO,GAAG,qDAAqD;AACxF,+CAA+C,cAAc,EAAE,cAAc,GAAG;AAChF;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD,qBAAqB,gBAAgB;AACrC,uCAAuC,wBAAwB;AAC/D;AACA,qBAAqB,mCAAmC;AACxD,mBAAmB,cAAc;AACjC,qBAAqB,mCAAmC;AACxD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA,4EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iDAAiD;AAC9E;AACA;AACA,oDAAoD,OAAO,GAAG,4BAA4B,WAAW;AACrG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA,sBAAsB,mEAAmE;AACzF;AACA;AACA,8BAA8B,iDAAiD;AAC/E;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAMLcwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware)"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { RequestCookies: () => RequestCookies, ResponseCookies: () => ResponseCookies, parseCookie: () => parseCookie, parseSetCookie: () => parseSetCookie, stringifyCookie: () => stringifyCookie }); module.exports = __toCommonJS(src_exports); // src/serialize.ts function stringifyCookie(c) { var _a; const attrs = [ "path" in c && c.path && `Path=${c.path}`, "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, "domain" in c && c.domain && `Domain=${c.domain}`, "secure" in c && c.secure && "Secure", "httpOnly" in c && c.httpOnly && "HttpOnly", "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, "partitioned" in c && c.partitioned && "Partitioned", "priority" in c && c.priority && `Priority=${c.priority}` ].filter(Boolean); const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; } function parseCookie(cookie) { const map = /* @__PURE__ */ new Map(); for (const pair of cookie.split(/; */)) { if (!pair) continue; const splitAt = pair.indexOf("="); if (splitAt === -1) { map.set(pair, "true"); continue; } const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; try { map.set(key, decodeURIComponent(value != null ? value : "true")); } catch { } } return map; } function parseSetCookie(setCookie) { if (!setCookie) { return void 0; } const [[name, value], ...attributes] = parseCookie(setCookie); const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries( attributes.map(([key, value2]) => [ key.toLowerCase().replace(/-/g, ""), value2 ]) ); const cookie = { name, value: decodeURIComponent(value), domain, ...expires && { expires: new Date(expires) }, ...httponly && { httpOnly: true }, ...typeof maxage === "string" && { maxAge: Number(maxage) }, path, ...samesite && { sameSite: parseSameSite(samesite) }, ...secure && { secure: true }, ...priority && { priority: parsePriority(priority) }, ...partitioned && { partitioned: true } }; return compact(cookie); } function compact(t) { const newT = {}; for (const key in t) { if (t[key]) { newT[key] = t[key]; } } return newT; } var SAME_SITE = ["strict", "lax", "none"]; function parseSameSite(string) { string = string.toLowerCase(); return SAME_SITE.includes(string) ? string : void 0; } var PRIORITY = ["low", "medium", "high"]; function parsePriority(string) { string = string.toLowerCase(); return PRIORITY.includes(string) ? string : void 0; } function splitCookiesString(cookiesString) { if (!cookiesString) return []; var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { cookiesSeparatorFound = true; pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // src/request-cookies.ts var RequestCookies = class { constructor(requestHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); this._headers = requestHeaders; const header = requestHeaders.get("cookie"); if (header) { const parsed = parseCookie(header); for (const [name, value] of parsed) { this._parsed.set(name, { name, value }); } } } [Symbol.iterator]() { return this._parsed[Symbol.iterator](); } /** * The amount of cookies received from the client */ get size() { return this._parsed.size; } get(...args) { const name = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(name); } getAll(...args) { var _a; const all = Array.from(this._parsed); if (!args.length) { return all.map(([_, value]) => value); } const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter(([n]) => n === name).map(([_, value]) => value); } has(name) { return this._parsed.has(name); } set(...args) { const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; const map = this._parsed; map.set(name, { name, value }); this._headers.set( "cookie", Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ") ); return this; } /** * Delete the cookies matching the passed name or names in the request. */ delete(names) { const map = this._parsed; const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); this._headers.set( "cookie", Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ") ); return result; } /** * Delete all the cookies in the cookies in the request. */ clear() { this.delete(Array.from(this._parsed.keys())); return this; } /** * Format the cookies in the request as a string for logging */ [Symbol.for("edge-runtime.inspect.custom")]() { return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); } }; // src/response-cookies.ts var ResponseCookies = class { constructor(responseHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); var _a, _b, _c; this._headers = responseHeaders; const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString); if (parsed) this._parsed.set(parsed.name, parsed); } } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. */ get(...args) { const key = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(key); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. */ getAll(...args) { var _a; const all = Array.from(this._parsed.values()); if (!args.length) { return all; } const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter((c) => c.name === key); } has(name) { return this._parsed.has(name); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. */ set(...args) { const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; const map = this._parsed; map.set(name, normalizeCookie({ name, value, ...cookie })); replace(map, this._headers); return this; } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. */ delete(...args) { const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]]; return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) }); } [Symbol.for("edge-runtime.inspect.custom")]() { return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map(stringifyCookie).join("; "); } }; function replace(bag, headers) { headers.delete("set-cookie"); for (const [, value] of bag) { const serialized = stringifyCookie(value); headers.append("set-cookie", serialized); } } function normalizeCookie(cookie = { name: "", value: "" }) { if (typeof cookie.expires === "number") { cookie.expires = new Date(cookie.expires); } if (cookie.maxAge) { cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); } if (cookie.path === null || cookie.path === void 0) { cookie.path = "/"; } return cookie; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { RequestCookies, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie }); =@webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware012undefined10408105150undefinedAB, /***/ 449:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource4/***/ ((module, exports, __webpack_require__) => { webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource $Hwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcevar __dirname = "/"; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource(D(()=>{var i={226:function(i,e){(function(o,a){"use strict";var r="1.0.35",t="",n="?",s="function",b="undefined",w="object",l="string",d="major",c="model",u="name",p="type",m="vendor",f="version",h="architecture",v="console",g="mobile",k="tablet",x="smarttv",_="wearable",y="embedded",q=350;var T="Amazon",S="Apple",z="ASUS",N="BlackBerry",A="Browser",C="Chrome",E="Edge",O="Firefox",U="Google",j="Huawei",P="LG",R="Microsoft",M="Motorola",B="Opera",V="Samsung",D="Sharp",I="Sony",W="Viera",F="Xiaomi",G="Zebra",H="Facebook",L="Chromium OS",Z="Mac OS";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]="iPad";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!="Unknown"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if("object"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window==="object"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(226);module.exports=o})();^webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware`IOA[AbAkAnAuAAACCvar __WEBPACK_AMD_DEFINE_RESULT__;"function"__webpack_require__.amdO!(__WEBPACK_AMD_DEFINE_RESULT__ = ().call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))__dirnamebuffersourcesizemapshashEvar __dirname = "/"; var __WEBPACK_AMD_DEFINE_RESULT__;(()=>{var i={226:function(i,e){(function(o,a){"use strict";var r="1.0.35",t="",n="?",s="function",b="undefined",w="object",l="string",d="major",c="model",u="name",p="type",m="vendor",f="version",h="architecture",v="console",g="mobile",k="tablet",x="smarttv",_="wearable",y="embedded",q=350;var T="Amazon",S="Apple",z="ASUS",N="BlackBerry",A="Browser",C="Chrome",E="Edge",O="Firefox",U="Google",j="Huawei",P="LG",R="Microsoft",M="Motorola",B="Opera",V="Samsung",D="Sharp",I="Sony",W="Viera",F="Xiaomi",G="Zebra",H="Facebook",L="Chromium OS",Z="Mac OS";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]="iPad";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!="Unknown"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if("object"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if("function"===s&&__webpack_require__.amdO){!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return UAParser}).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window==="object"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(226);module.exports=o})(); {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesx;AAAA,wCAAM,OAAO,kBAAkB,eAAe,aAAa,uOAAuO,qQAAqQ,yBAAyB,SAAS,gBAAgB,4BAA4B,uBAAuB,KAAK,WAAW,SAAS,uBAAuB,SAAS,YAAY,WAAW,KAAK,2BAA2B,SAAS,mBAAmB,gEAAgE,sBAAsB,uBAAuB,sBAAsB,4DAA4D,oBAAoB,iBAAiB,wBAAwB,yCAAyC,4BAA4B,oBAAoB,sBAAsB,oBAAoB,MAAM,sBAAsB,UAAU,MAAM,iBAAiB,QAAQ,QAAQ,WAAW,KAAK,SAAS,OAAO,6BAA6B,iBAAiB,mBAAmB,6BAA6B,KAAK,iBAAiB,sBAAsB,6CAA6C,sCAAsC,KAAK,qCAAqC,sBAAsB,qDAAqD,KAAK,iBAAiB,MAAM,yBAAyB,gBAAgB,mCAAmC,YAAY,cAAc,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AkD,gOAAgO,kHAAkH,YAAY,+FAA+F,oXAAoX,IAAI,mCAAmC,IAAI,6PAA6P,2BAA2B,iBAAiB,IAAI,IAAI,gCAAgC,qCAAqC,8CAA8C,wCAAwC,2CAA2C,sBAAsB,wBAAwB,2BAA2B,SAAS,OAAO,OAAO,8BAA8B,oBAAoB,6CAA6C,aAAa,UAAU,uBAAuB,SAAS,OAAO,0BAA0B,UAAU,0BAA0B,SAAS,OAAO,OAAO,OAAO,6BAA6B,0BAA0B,OAAO,2FAA2F,YAAY,OAAO,UAAU,0BAA0B,SAAS,OAAO,OAAO,6BAA6B,UAAU,sBAAsB,SAAS,OAAO,OAAO,yBAAyB,uCAAuC,4DAA4D,UAAU,0BAA0B,OAAO,8HAA8H,sBAAsB,UAAU,uBAAuB,uCAAuC,aAAa,cAAc,aAAa,mBAAmB,oCAAoC,4BAA4B,+CAA+C,6CAA6C,iBAAiB,4BAA4B,qBAAqB,oBAAoB,KAAK,GAAG,UAAa,MAAM,wBAAU,EAAE,mCAAQ,WAAW,gBAAgB;AAAA,kGAAE,CAAC,sBAAsB,qBAAqB,wCAAwC,aAAa,mBAAmB,mBAAmB,oBAAoB,kBAAkB,qBAAqB,WAAW,oBAAoB,gBAAgB,gBAAgB,0CAA0C,SAAS,gCAAgC,WAAW,kBAAkB,iBAAiB,YAAY,YAAY,WAAW,IAAI,qDAAqD,QAAQ,QAAQ,iBAAiB,iBAAiB,mEAAmE,SAAS,KAAK,+BAA+B,iBAAiB^webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware(D(()=>{var i={226:function(i,e){(function(o,a){"use strict";var r="1.0.35",t="",n="?",s="function",b="undefined",w="object",l="string",d="major",c="model",u="name",p="type",m="vendor",f="version",h="architecture",v="console",g="mobile",k="tablet",x="smarttv",_="wearable",y="embedded",q=350;var T="Amazon",S="Apple",z="ASUS",N="BlackBerry",A="Browser",C="Chrome",E="Edge",O="Firefox",U="Google",j="Huawei",P="LG",R="Microsoft",M="Motorola",B="Opera",V="Samsung",D="Sharp",I="Sony",W="Viera",F="Xiaomi",G="Zebra",H="Facebook",L="Chromium OS",Z="Mac OS";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]="iPad";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!="Unknown"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if("object"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window==="object"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(226);module.exports=o})();ConcatSourceRawSourcevar __dirname = "/"; ReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware0-1var __WEBPACK_AMD_DEFINE_RESULT__;undefined1671916731"function"undefined1673816747__webpack_require__.amdOundefined1675016757!(__WEBPACK_AMD_DEFINE_RESULT__ = (undefined1678516786).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))undefined1738217390__dirnameundefined /***/ }) !ZE/***/ ((module, exports, __webpack_require__) => { var __dirname = "/"; var __WEBPACK_AMD_DEFINE_RESULT__;(()=>{var i={226:function(i,e){(function(o,a){"use strict";var r="1.0.35",t="",n="?",s="function",b="undefined",w="object",l="string",d="major",c="model",u="name",p="type",m="vendor",f="version",h="architecture",v="console",g="mobile",k="tablet",x="smarttv",_="wearable",y="embedded",q=350;var T="Amazon",S="Apple",z="ASUS",N="BlackBerry",A="Browser",C="Chrome",E="Edge",O="Firefox",U="Google",j="Huawei",P="LG",R="Microsoft",M="Motorola",B="Opera",V="Samsung",D="Sharp",I="Sony",W="Viera",F="Xiaomi",G="Zebra",H="Facebook",L="Chromium OS",Z="Mac OS";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]="iPad";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!="Unknown"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if("object"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if("function"===s&&__webpack_require__.amdO){!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return UAParser}).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window==="object"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(226);module.exports=o})(); /***/ }) "%,x;;;AAAA,wCAAM,OAAO,kBAAkB,eAAe,aAAa,uOAAuO,qQAAqQ,yBAAyB,SAAS,gBAAgB,4BAA4B,uBAAuB,KAAK,WAAW,SAAS,uBAAuB,SAAS,YAAY,WAAW,KAAK,2BAA2B,SAAS,mBAAmB,gEAAgE,sBAAsB,uBAAuB,sBAAsB,4DAA4D,oBAAoB,iBAAiB,wBAAwB,yCAAyC,4BAA4B,oBAAoB,sBAAsB,oBAAoB,MAAM,sBAAsB,UAAU,MAAM,iBAAiB,QAAQ,QAAQ,WAAW,KAAK,SAAS,OAAO,6BAA6B,iBAAiB,mBAAmB,6BAA6B,KAAK,iBAAiB,sBAAsB,6CAA6C,sCAAsC,KAAK,qCAAqC,sBAAsB,qDAAqD,KAAK,iBAAiB,MAAM,yBAAyB,gBAAgB,mCAAmC,YAAY,cAAc,KAAK,mBAAmB,mBAAmB,qBAAqB,kBAAkB,UAAU,OAAO,+FAA+F,IAAI,sKAAsK,OAAO,2JAA2J,IAAI,w3BAAw3B,IAAI,q2BAAq2B,gBAAgB,khBAAkhB,GAAG,yVAAyV,2fAA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,2BAA2B,SAAS,OAAO,OAAO,8BAA8B,oBAAoB,6CAA6C,aAAa,UAAU,uBAAuB,SAAS,OAAO,0BAA0B,UAAU,0BAA0B,SAAS,OAAO,OAAO,OAAO,6BAA6B,0BAA0B,OAAO,2FAA2F,YAAY,OAAO,UAAU,0BAA0B,SAAS,OAAO,OAAO,6BAA6B,UAAU,sBAAsB,SAAS,OAAO,OAAO,yBAAyB,uCAAuC,4DAA4D,UAAU,0BAA0B,OAAO,8HAA8H,sBAAsB,UAAU,uBAAuB,uCAAuC,aAAa,cAAc,aAAa,mBAAmB,oCAAoC,4BAA4B,+CAA+C,6CAA6C,iBAAiB,4BAA4B,qBAAqB,oBAAoB,KAAK,GAAG,UAAa,MAAM,wBAAU,EAAE,mCAAQ,WAAW,gBAAgB;AAAA,kGAAE,CAAC,sBAAsB,qBAAqB,wCAAwC,aAAa,mBAAmB,mBAAmB,oBAAoB,kBAAkB,qBAAqB,WAAW,oBAAoB,gBAAgB,gBAAgB,0CAA0C,SAAS,gCAAgC,WAAW,kBAAkB,iBAAiB,YAAY,YAAY,WAAW,IAAI,qDAAqD,QAAQ,QAAQ,iBAAiB,iBAAiB,mEAAmE,SAAS,KAAK,+BAA+B,iBAAiB,I^webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware(D(()=>{var i={226:function(i,e){(function(o,a){"use strict";var r="1.0.35",t="",n="?",s="function",b="undefined",w="object",l="string",d="major",c="model",u="name",p="type",m="vendor",f="version",h="architecture",v="console",g="mobile",k="tablet",x="smarttv",_="wearable",y="embedded",q=350;var T="Amazon",S="Apple",z="ASUS",N="BlackBerry",A="Browser",C="Chrome",E="Edge",O="Firefox",U="Google",j="Huawei",P="LG",R="Microsoft",M="Motorola",B="Opera",V="Samsung",D="Sharp",I="Sony",W="Viera",F="Xiaomi",G="Zebra",H="Facebook",L="Chromium OS",Z="Mac OS";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]="iPad";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!="Unknown"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if("object"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window==="object"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(226);module.exports=o})(); -4/***/ ((module, exports, __webpack_require__) => { ,/webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware0-1var __WEBPACK_AMD_DEFINE_RESULT__;undefined1671916731"function"undefined1673816747__webpack_require__.amdOundefined1675016757!(__WEBPACK_AMD_DEFINE_RESULT__ = (undefined1678516786).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))undefined1738217390__dirnameundefined01, /***/ 521:  zwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource-module.exports = require("node:async_hooks");external commonjs "node:async_hooks" /***/ }) [/***/ ((module) => { "use strict"; module.exports = require("node:async_hooks"); /***/ }) x ;;;AAAA,6Cexternal commonjs "node:async_hooks"-module.exports = require("node:async_hooks");-external commonjs "node:async_hooks"RawSource!, /***/ 663:  !webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource/***/ ((module) => { webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcevar __dirname = "/"; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource(()=>{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p { var __dirname = "/"; (()=>{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource?"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { interceptTestApis: null, wrapRequestHandler: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { interceptTestApis: function() { return interceptTestApis; }, wrapRequestHandler: function() { return wrapRequestHandler; } }); const _context = require("./context"); const _fetch = require("./fetch"); function interceptTestApis() { return (0, _fetch.interceptFetch)(global.fetch); } function wrapRequestHandler(handler) { return (req, fn)=>(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); } //# sourceMappingURL=server-edge.js.map`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware e :NNWJ  )/19Object.defineProperty(exports, "__esModule", ())0__webpack_require__392165__webpack_require__.gbuffersourcesizemapshash Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { interceptTestApis: function() { return interceptTestApis; }, wrapRequestHandler: function() { return wrapRequestHandler; } }); const _context = __webpack_require__(392); const _fetch = __webpack_require__(165); function interceptTestApis() { return (0, _fetch.interceptFetch)(__webpack_require__.g.fetch); } function wrapRequestHandler(handler) { return (req, fn)=>(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); } //# sourceMappingURL=server-edge.js.map {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesxAAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAGL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,GAAW;AACpC,eAAe,mBAAO,CAAC,GAAS;AAChC;AACA,sCAAsC,qBAAM;AAC5C;AACA;AACA;AACA;;AAEA`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware?"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { interceptTestApis: null, wrapRequestHandler: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { interceptTestApis: function() { return interceptTestApis; }, wrapRequestHandler: function() { return wrapRequestHandler; } }); const _context = require("./context"); const _fetch = require("./fetch"); function interceptTestApis() { return (0, _fetch.interceptFetch)(global.fetch); } function wrapRequestHandler(handler) { return (req, fn)=>(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); } //# sourceMappingURL=server-edge.js.mapReplaceSourceOriginalSourceQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871640undefined516522__webpack_require__undefined524534392undefined553559__webpack_require__undefined561569165undefined642647__webpack_require__.gundefined /***/ }) ]/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { interceptTestApis: function() { return interceptTestApis; }, wrapRequestHandler: function() { return wrapRequestHandler; } }); const _context = __webpack_require__(392); const _fetch = __webpack_require__(165); function interceptTestApis() { return (0, _fetch.interceptFetch)(__webpack_require__.g.fetch); } function wrapRequestHandler(handler) { return (req, fn)=>(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); } //# sourceMappingURL=server-edge.js.map /***/ }) x;;;AAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAGL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,GAAW;AACpC,eAAe,mBAAO,CAAC,GAAS;AAChC;AACA,sCAAsC,qBAAM;AAC5C;AACA;AACA;AACA;;AAEA,uC`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware?"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { interceptTestApis: null, wrapRequestHandler: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { interceptTestApis: function() { return interceptTestApis; }, wrapRequestHandler: function() { return wrapRequestHandler; } }); const _context = require("./context"); const _fetch = require("./fetch"); function interceptTestApis() { return (0, _fetch.interceptFetch)(global.fetch); } function wrapRequestHandler(handler) { return (req, fn)=>(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); } //# sourceMappingURL=server-edge.js.mapQwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871640undefined516522__webpack_require__undefined524534392undefined553559__webpack_require__undefined561569165undefined642647__webpack_require__.gundefined, /***/ 814:   webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceS/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource !webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSource'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./cjs/react.react-server.production.js'); } else { module.exports = require('./cjs/react.react-server.development.js'); } `webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middlewared 7>Atruemodule.exports = __webpack_require__(440){}buffersourcesizemapshashE if (true) { module.exports = __webpack_require__(440); } else {} {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesx<AAAa;;AAEb,IAAI,IAAqC;AACzC,EAAE,yCAAkE;AACpE,EAAE,KAAK,EAEN`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./cjs/react.react-server.production.js'); } else { module.exports = require('./cjs/react.react-server.development.js'); } ReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware012undefined1955trueundefined62127module.exports = __webpack_require__(440)undefined137210{}undefined /***/ }) /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { module.exports = __webpack_require__(440); } else {} /***/ }) x?;;;AAAa;;AAEb,IAAI,IAAqC;AACzC,EAAE,yCAAkE;AACpE,EAAE,KAAK,EAEN`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./cjs/react.react-server.production.js'); } else { module.exports = require('./cjs/react.react-server.development.js'); } S/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware012undefined1955trueundefined62127module.exports = __webpack_require__(440)undefined137210{}undefined, /***/ 817:  twebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceE/***/ ((module, __unused_webpack_exports, __webpack_require__) => { webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource rwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcevar __dirname = "/"; webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/OriginalSourceo(()=>{"use strict";var e={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.6.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middlewareC$=)=_`__webpack_require__.g__dirnamebuffersourcesizemapshashovar __dirname = "/"; (()=>{"use strict";var e={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:__webpack_require__.g},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.6.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})(); {"finalSource":true}mapbufferedMapversionfilemappingssourcessourcesContentnamesx;AAAA,MAAM,aAAa,OAAO,cAAc,sCAAsC,WAAW,EAAE,oBAAoB,eAAe,eAAe,eAAe,kBAAkB,iCAAiC,iBAAiB,eAAe,qBAAqB,oBAAoB,8BAA8B,sBAAsB,2BAA2B,qDAAqD,SAAS,0CAA0C,iBAAiB,kDAAkD,UAAU,2CAA2C,qBAAqB,4BAA4B,UAAU,oCAAoC,gDAAgD,wBAAwB,eAAe,sCAAsC,WAAW,EAAE,iBAAiB,cAAc,eAAe,eAAe,eAAe,eAAe,cAAc,cAAc,sBAAsB,sBAAsB,gCAAgC,aAAa,mBAAmB,aAAa,sBAAsB,6BAA6B,IAAI,UAAU,UAAU,wJAAwJ,oDAAoD,aAAa,wBAAwB,GAAG,YAAY,gCAAgC,kGAAkG,kCAAkC,qFAAqF,kDAAkD,EAAE,GAAG,oEAAoE,EAAE,GAAG,6CAA6C,sBAAsB,eAAe,6BAA6B,wDAAwD,+BAA+B,2BAA2B,yBAAyB,yBAAyB,2BAA2B,kBAAkB,oBAAoB,2BAA2B,uBAAuB,kBAAkB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+BAA+B,+BAA+B,EAAE,gDAAgD,+BAA+B,+BAA+B,EAAE,+BAA+B,uCAAuC,+BAA+B,sBAAsB,EAAE,+BAA+B,+CAA+C,+BAA+B,8BAA8B,EAAE,+BAA+B,4CAA4C,+BAA+B,2BAA2B,EAAE,+BAA+B,oCAAoC,+BAA+B,mBAAmB,EAAE,+BAA+B,0CAA0C,+BAA+B,yBAAyB,EAAE,+BAA+B,sCAAsC,+BAA+B,qBAAqB,EAAE,8BAA8B,4CAA4C,+BAA+B,2BAA2B,EAAE,+BAA+B,8CAA8C,+BAA+B,6BAA6B,EAAE,0CAA0C,+BAA+B,yBAAyB,EAAE,yCAAyC,+BAA+B,wBAAwB,EAAE,+BAA+B,0CAA0C,+BAA+B,yBAAyB,EAAE,2CAA2C,+BAA+B,0BAA0B,EAAE,gDAAgD,+BAA+B,+BAA+B,EAAE,gCAAgC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,gCAAgC,+BAA+B,eAAe,EAAE,iCAAiC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,uCAAuC,+BAA+B,sBAAsB,EAAE,iCAAiC,iCAAiC,+BAA+B,gBAAgB,EAAE,cAAc,yFAAyF,IAAI,iBAAiB`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middlewareo(()=>{"use strict";var e={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.6.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();ConcatSourceRawSourcevar __dirname = "/"; ReplaceSourceOriginalSourcewebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middleware1565215657__webpack_require__.gundefined2457124579__dirnameundefined /***/ }) (p/***/ ((module, __unused_webpack_exports, __webpack_require__) => { var __dirname = "/"; (()=>{"use strict";var e={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:__webpack_require__.g},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.6.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})(); /***/ }) x;;;AAAA,MAAM,aAAa,OAAO,cAAc,sCAAsC,WAAW,EAAE,oBAAoB,eAAe,eAAe,eAAe,kBAAkB,iCAAiC,iBAAiB,eAAe,qBAAqB,oBAAoB,8BAA8B,sBAAsB,2BAA2B,qDAAqD,SAAS,0CAA0C,iBAAiB,kDAAkD,UAAU,2CAA2C,qBAAqB,4BAA4B,UAAU,oCAAoC,gDAAgD,wBAAwB,eAAe,sCAAsC,WAAW,EAAE,iBAAiB,cAAc,eAAe,eAAe,eAAe,eAAe,cAAc,cAAc,sBAAsB,sBAAsB,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AAW,EAAE,6cAA6c,+BAA+B,0DAA0D,+BAA+B,yCAAyC,EAAE,+BAA+B,4CAA4C,+BAA+B,2BAA2B,EAAE,wCAAwC,+BAA+B,uBAAuB,EAAE,+BAA+B,6CAA6C,+BAA+B,4BAA4B,EAAE,+BAA+B,wCAAwC,+BAA+B,uBAAuB,EAAE,+BAA+B,2CAA2C,+BAA+B,0BAA0B,EAAE,+BAA+B,qCAAqC,+BAA+B,oBAAoB,EAAE,+BAA+B,gDAAgD,+BAA+B,+BAA+B,EAAE,gDAAgD,+BAA+B,+BAA+B,EAAE,+BAA+B,uCAAuC,+BAA+B,sBAAsB,EAAE,+BAA+B,+CAA+C,+BAA+B,8BAA8B,EAAE,+BAA+B,4CAA4C,+BAA+B,2BAA2B,EAAE,+BAA+B,oCAAoC,+BAA+B,mBAAmB,EAAE,+BAA+B,0CAA0C,+BAA+B,yBAAyB,EAAE,+BAA+B,sCAAsC,+BAA+B,qBAAqB,EAAE,8BAA8B,4CAA4C,+BAA+B,2BAA2B,EAAE,+BAA+B,8CAA8C,+BAA+B,6BAA6B,EAAE,0CAA0C,+BAA+B,yBAAyB,EAAE,yCAAyC,+BAA+B,wBAAwB,EAAE,+BAA+B,0CAA0C,+BAA+B,yBAAyB,EAAE,2CAA2C,+BAA+B,0BAA0B,EAAE,gDAAgD,+BAA+B,+BAA+B,EAAE,gCAAgC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,gCAAgC,+BAA+B,eAAe,EAAE,iCAAiC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,uCAAuC,+BAA+B,sBAAsB,EAAE,iCAAiC,iCAAiC,+BAA+B,gBAAgB,EAAE,cAAc,yFAAyF,IAAI,iBAAiB,I`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middlewareo(()=>{"use strict";var e={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.6.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})(); E/***/ ((module, __unused_webpack_exports, __webpack_require__) => { Xwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middleware1565215657__webpack_require__.gundefined2457124579__dirnameundefined }, webpack/lib/util/registerExternalSerializerwebpack-sources/PrefixSource/******/ 2__webpack_require__ => { // webpackRuntimeModules var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = (__webpack_exec__(208)); s(_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)["middleware_src/middleware"] = __webpack_exports__; } ]); 8(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[550],{ /***/ 165: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { handleFetch: function() { return handleFetch; }, interceptFetch: function() { return interceptFetch; }, reader: function() { return reader; } }); const _context = __webpack_require__(392); const reader = { url (req) { return req.url; }, header (req, name) { return req.headers.get(name); } }; function getTestStack() { let stack = (new Error().stack ?? '').split('\n'); // Skip the first line and find first non-empty line. for(let i = 1; i < stack.length; i++){ if (stack[i].length > 0) { stack = stack.slice(i); break; } } // Filter out franmework lines. stack = stack.filter((f)=>!f.includes('/next/dist/')); // At most 5 lines. stack = stack.slice(0, 5); // Cleanup some internal info and trim. stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); return stack.join(' '); } async function buildProxyRequest(testData, request) { const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; return { testData, api: 'fetch', request: { url, method, headers: [ ...Array.from(headers), [ 'next-test-stack', getTestStack() ] ], body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } }; } function buildResponse(proxyResponse) { const { status, headers, body } = proxyResponse.response; return new Response(body ? Buffer.from(body, 'base64') : null, { status, headers: new Headers(headers) }); } async function handleFetch(originalFetch, request) { const testInfo = (0, _context.getTestReqInfo)(request, reader); if (!testInfo) { // Passthrough non-test requests. return originalFetch(request); } const { testData, proxyPort } = testInfo; const proxyRequest = await buildProxyRequest(testData, request); const resp = await originalFetch(`http://localhost:${proxyPort}`, { method: 'POST', body: JSON.stringify(proxyRequest), next: { // @ts-ignore internal: true } }); if (!resp.ok) { throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { value: "E146", enumerable: false, configurable: true }); } const proxyResponse = await resp.json(); const { api } = proxyResponse; switch(api){ case 'continue': return originalFetch(request); case 'abort': case 'unhandled': throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { value: "E145", enumerable: false, configurable: true }); case 'fetch': return buildResponse(proxyResponse); default: return api; } } function interceptFetch(originalFetch) { __webpack_require__.g.fetch = function testFetch(input, init) { var _init_next; // Passthrough internal requests. // @ts-ignore if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { return originalFetch(input, init); } return handleFetch(originalFetch, new Request(input, init)); }; return ()=>{ __webpack_require__.g.fetch = originalFetch; }; } //# sourceMappingURL=fetch.js.map /***/ }), /***/ 208: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ nHandler) }); // NAMESPACE OBJECT: ./src/middleware.js var middleware_namespaceObject = {}; __webpack_require__.r(middleware_namespaceObject); __webpack_require__.d(middleware_namespaceObject, { config: () => (config), middleware: () => (middleware) }); ;// ./node_modules/next/dist/esm/server/web/globals.js async function getEdgeInstrumentationModule() { const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; return instrumentation; } let instrumentationModulePromise = null; async function registerInstrumentation() { // Ensure registerInstrumentation is not called in production build if (process.env.NEXT_PHASE === 'phase-production-build') return; if (!instrumentationModulePromise) { instrumentationModulePromise = getEdgeInstrumentationModule(); } const instrumentation = await instrumentationModulePromise; if (instrumentation == null ? void 0 : instrumentation.register) { try { await instrumentation.register(); } catch (err) { err.message = `An error occurred while loading instrumentation hook: ${err.message}`; throw err; } } } async function edgeInstrumentationOnRequestError(...args) { const instrumentation = await getEdgeInstrumentationModule(); try { var _instrumentation_onRequestError; await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); } catch (err) { // Log the soft error and continue, since the original error has already been thrown console.error('Error in instrumentation.onRequestError:', err); } } let registerInstrumentationPromise = null; function ensureInstrumentationRegistered() { if (!registerInstrumentationPromise) { registerInstrumentationPromise = registerInstrumentation(); } return registerInstrumentationPromise; } function getUnsupportedModuleErrorMessage(module) { // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found return `The edge runtime does not support Node.js '${module}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; } function __import_unsupported(moduleName) { const proxy = new Proxy(function() {}, { get (_obj, prop) { if (prop === 'then') { return {}; } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, construct () { throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }, apply (_target, _this, args) { if (typeof args[0] === 'function') { return args[0](proxy); } throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } }); return new Proxy({}, { get: ()=>proxy }); } function enhanceGlobals() { if (false) {} // The condition is true when the "process" module is provided if (process !== __webpack_require__.g.process) { // prefer local process but global.process has correct "env" process.env = __webpack_require__.g.process.env; __webpack_require__.g.process = process; } // to allow building code that import but does not use node.js modules, // webpack will expect this function to exist in global scope try { Object.defineProperty(globalThis, '__import_unsupported', { value: __import_unsupported, enumerable: false, configurable: false }); } catch {} // Eagerly fire instrumentation hook to make the startup faster. void ensureInstrumentationRegistered(); } enhanceGlobals(); //# sourceMappingURL=globals.js.map ;// ./node_modules/next/dist/esm/server/web/error.js class PageSignatureError extends Error { constructor({ page }){ super(`The middleware "${page}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `); } } class RemovedPageError extends Error { constructor(){ super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `); } } class RemovedUAError extends Error { constructor(){ super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `); } } //# sourceMappingURL=error.js.map ;// ./node_modules/next/dist/esm/lib/constants.js const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; const MATCHED_PATH_HEADER = 'x-matched-path'; const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; const RSC_SEGMENT_SUFFIX = '.segment.rsc'; const RSC_SUFFIX = '.rsc'; const ACTION_SUFFIX = '.action'; const NEXT_DATA_SUFFIX = '.json'; const NEXT_META_SUFFIX = '.meta'; const NEXT_BODY_SUFFIX = '.body'; const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; const NEXT_RESUME_HEADER = 'next-resume'; // if these change make sure we update the related // documentation as well const NEXT_CACHE_TAG_MAX_ITEMS = 128; const NEXT_CACHE_TAG_MAX_LENGTH = 256; const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; // in seconds const CACHE_ONE_YEAR = 31536000; // in seconds, represents revalidate=false. I.e. never revaliate. // We use this value since it can be represented as a V8 SMI for optimal performance. // It can also be serialized as JSON if it ever leaks accidentally as an actual value. const INFINITE_CACHE = 0xfffffffe; // Patterns to detect middleware files const MIDDLEWARE_FILENAME = 'middleware'; const MIDDLEWARE_LOCATION_REGEXP = (/* unused pure expression or super */ null && (`(?:src/)?${MIDDLEWARE_FILENAME}`)); // Pattern to detect instrumentation hooks file const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; // Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path, // we have to use a private alias const PAGES_DIR_ALIAS = 'private-next-pages'; const DOT_NEXT_ALIAS = 'private-dot-next'; const ROOT_DIR_ALIAS = 'private-next-root-dir'; const APP_DIR_ALIAS = 'private-next-app-dir'; const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy'; const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; const PUBLIC_DIR_MIDDLEWARE_CONFLICT = (/* unused pure expression or super */ null && (`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`)); const SSG_GET_INITIAL_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`)); const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`)); const SERVER_PROPS_SSG_CONFLICT = (/* unused pure expression or super */ null && (`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`)); const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = (/* unused pure expression or super */ null && (`can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`)); const SERVER_PROPS_EXPORT_ERROR = (/* unused pure expression or super */ null && (`pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`)); const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; const UNSTABLE_REVALIDATE_RENAME_ERROR = (/* unused pure expression or super */ null && ('The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.')); const GSSP_COMPONENT_MEMBER_ERROR = (/* unused pure expression or super */ null && (`can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`)); const NON_STANDARD_NODE_ENV = (/* unused pure expression or super */ null && (`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`)); const SSG_FALLBACK_EXPORT_ERROR = (/* unused pure expression or super */ null && (`Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`)); const ESLINT_DEFAULT_DIRS = (/* unused pure expression or super */ null && ([ 'app', 'pages', 'components', 'lib', 'src' ])); const SERVER_RUNTIME = { edge: 'edge', experimentalEdge: 'experimental-edge', nodejs: 'nodejs' }; /** * The names of the webpack layers. These layers are the primitives for the * webpack chunks. */ const WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: 'shared', /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: 'rsc', /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: 'ssr', /** * The browser client bundle layer for actions. */ actionBrowser: 'action-browser', /** * The Node.js bundle layer for the API routes. */ apiNode: 'api-node', /** * The Edge Lite bundle layer for the API routes. */ apiEdge: 'api-edge', /** * The layer for the middleware code. */ middleware: 'middleware', /** * The layer for the instrumentation hooks. */ instrument: 'instrument', /** * The layer for assets on the edge. */ edgeAsset: 'edge-asset', /** * The browser client bundle layer for App directory. */ appPagesBrowser: 'app-pages-browser', /** * The browser client bundle layer for Pages directory. */ pagesDirBrowser: 'pages-dir-browser', /** * The Edge Lite bundle layer for Pages directory. */ pagesDirEdge: 'pages-dir-edge', /** * The Node.js bundle layer for Pages directory. */ pagesDirNode: 'pages-dir-node' }; const WEBPACK_LAYERS = { ...WEBPACK_LAYERS_NAMES, GROUP: { builtinReact: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser ], serverOnly: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], neutralTarget: [ // pages api WEBPACK_LAYERS_NAMES.apiNode, WEBPACK_LAYERS_NAMES.apiEdge ], clientOnly: [ WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser ], bundled: [ WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.shared, WEBPACK_LAYERS_NAMES.instrument, WEBPACK_LAYERS_NAMES.middleware ], appPages: [ // app router pages and layouts WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser, WEBPACK_LAYERS_NAMES.actionBrowser ] } }; const WEBPACK_RESOURCE_QUERIES = { edgeSSREntry: '__next_edge_ssr_entry__', metadata: '__next_metadata__', metadataRoute: '__next_metadata_route__', metadataImageMeta: '__next_metadata_image_meta__' }; //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/server/web/utils.js /** * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any * headers with multiple values will be joined with a comma and space. Any * headers that have an undefined value will be ignored and others will be * coerced to strings. * * @param nodeHeaders the headers object to convert * @returns the converted headers object */ function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } /** * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is * required to support the set-cookie header, which may have multiple values. * * @param headers the headers object to convert * @returns the converted headers object */ function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } /** * Validate the correctness of a user-provided URL. */ function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } /** * Normalizes `nxtP` and `nxtI` query param values to remove the prefix. * This function does not mutate the input key. */ function normalizeNextQueryParam(key) { const prefixes = [ NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js const responseSymbol = Symbol('response'); const passThroughSymbol = Symbol('passThrough'); const waitUntilSymbol = Symbol('waitUntil'); class FetchEvent { constructor(_request, waitUntil){ this[passThroughSymbol] = false; this[waitUntilSymbol] = waitUntil ? { kind: 'external', function: waitUntil } : { kind: 'internal', promises: [] }; } // TODO: is this dead code? NextFetchEvent never lets this get called respondWith(response) { if (!this[responseSymbol]) { this[responseSymbol] = Promise.resolve(response); } } // TODO: is this dead code? passThroughSymbol is unused passThroughOnException() { this[passThroughSymbol] = true; } waitUntil(promise) { if (this[waitUntilSymbol].kind === 'external') { // if we received an external waitUntil, we delegate to it // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` const waitUntil = this[waitUntilSymbol].function; return waitUntil(promise); } else { // if we didn't receive an external waitUntil, we make it work on our own // (and expect the caller to do something with the promises) this[waitUntilSymbol].promises.push(promise); } } } function getWaitUntilPromiseFromEvent(event) { return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; } class NextFetchEvent extends FetchEvent { constructor(params){ var _params_context; super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); this.sourcePage = params.page; } /** * @deprecated The `request` is now the first parameter and the API is now async. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } /** * @deprecated Using `respondWith` is no longer needed. * * Read more: https://nextjs.org/docs/messages/middleware-new-signature */ respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } //# sourceMappingURL=fetch-event.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems){ var _item_domain, _item_locales; // remove port if present const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { return item; } } } //# sourceMappingURL=detect-domain-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ function removeTrailingSlash(route) { return route.replace(/\/$/, '') || '/'; } //# sourceMappingURL=remove-trailing-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js /** * Given a path this function will find the pathname, query and hash and return * them. This is useful to parse full paths on the client side. * @param path A path to parse e.g. /foo/bar?id=1#hash */ function parsePath(path) { const hashIndex = path.indexOf('#'); const queryIndex = path.indexOf('?'); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', hash: hashIndex > -1 ? path.slice(hashIndex) : '' }; } return { pathname: path, query: '', hash: '' }; } //# sourceMappingURL=parse-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js /** * Adds the provided prefix to the given path. It first ensures that the path * is indeed starting with a slash. */ function addPathPrefix(path, prefix) { if (!path.startsWith('/') || !prefix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + prefix + pathname + query + hash; } //# sourceMappingURL=add-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js /** * Similarly to `addPathPrefix`, this function adds a suffix at the end on the * provided path. It also works only for paths ensuring the argument starts * with a slash. */ function addPathSuffix(path, suffix) { if (!path.startsWith('/') || !suffix) { return path; } const { pathname, query, hash } = parsePath(path); return "" + pathname + suffix + query + hash; } //# sourceMappingURL=add-path-suffix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js /** * Checks if a given path starts with a given prefix. It ensures it matches * exactly without containing extra chars. e.g. prefix /docs should replace * for /docs, /docs/, /docs/a but not /docsss * @param path The path to check. * @param prefix The prefix to check against. */ function pathHasPrefix(path, prefix) { if (typeof path !== 'string') { return false; } const { pathname } = parsePath(path); return pathname === prefix || pathname.startsWith(prefix + '/'); } //# sourceMappingURL=path-has-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js /** * For a given path and a locale, if the locale is given, it will prefix the * locale. The path shouldn't be an API path. If a default locale is given the * prefix will be omitted if the locale is already the default locale. */ function addLocale(path, locale, defaultLocale, ignorePrefix) { // If no locale was given or the locale is the default locale, we don't need // to prefix the path. if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); // If the path is an API path or the path already has the locale prefix, we // don't need to prefix the path. if (!ignorePrefix) { if (pathHasPrefix(lower, '/api')) return path; if (pathHasPrefix(lower, "/" + locale.toLowerCase())) return path; } // Add the locale prefix to the path. return addPathPrefix(path, "/" + locale); } //# sourceMappingURL=add-locale.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js function formatNextPathnameInfo(info) { let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = removeTrailingSlash(pathname); } if (info.buildId) { pathname = addPathSuffix(addPathPrefix(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); } pathname = addPathPrefix(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname); } //# sourceMappingURL=format-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/shared/lib/get-hostname.js /** * Takes an object with a hostname property (like a parsed URL) and some * headers that may contain Host and returns the preferred hostname. * @param parsed An object containing a hostname property. * @param headers A dictionary with headers containing a `host`. */ function getHostname(parsed, headers) { // Get the hostname from the headers if it exists, otherwise use the parsed // hostname. let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(':', 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } //# sourceMappingURL=get-hostname.js.map ;// ./node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js /** * A cache of lowercased locales for each list of locales. This is stored as a * WeakMap so if the locales are garbage collected, the cache entry will be * removed as well. */ const cache = new WeakMap(); /** * For a pathname that may include a locale from a list of locales, it * removes the locale from the pathname returning it alongside with the * detected locale. * * @param pathname A pathname that may include a locale. * @param locales A list of locales. * @returns The detected locale and pathname without locale */ function normalizeLocalePath(pathname, locales) { // If locales is undefined, return the pathname as is. if (!locales) return { pathname }; // Get the cached lowercased locales or create a new cache entry. let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; // The first segment will be empty, because it has a leading `/`. If // there is no further segment, there is no locale (or it's the default). const segments = pathname.split('/', 2); // If there's no second segment (ie, the pathname is just `/`), there's no // locale. if (!segments[1]) return { pathname }; // The second segment will contain the locale part if any. const segment = segments[1].toLowerCase(); // See if the segment matches one of the locales. If it doesn't, there is // no locale (or it's the default). const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; // Return the case-sensitive locale. detectedLocale = locales[index]; // Remove the `/${locale}` part of the pathname. pathname = pathname.slice(detectedLocale.length + 1) || '/'; return { pathname, detectedLocale }; } //# sourceMappingURL=normalize-locale-path.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js /** * Given a path and a prefix it will remove the prefix when it exists in the * given path. It ensures it matches exactly without containing extra chars * and if the prefix is not there it will be noop. * * @param path The path to remove the prefix from. * @param prefix The prefix to be removed. */ function removePathPrefix(path, prefix) { // If the path doesn't start with the prefix we can return it as is. This // protects us from situations where the prefix is a substring of the path // prefix such as: // // For prefix: /blog // // /blog -> true // /blog/ -> true // /blog/1 -> true // /blogging -> false // /blogging/ -> false // /blogging/1 -> false if (!pathHasPrefix(path, prefix)) { return path; } // Remove the prefix from the path via slicing. const withoutPrefix = path.slice(prefix.length); // If the path without the prefix starts with a `/` we can return it as is. if (withoutPrefix.startsWith('/')) { return withoutPrefix; } // If the path without the prefix doesn't start with a `/` we need to add it // back to the path to make sure it's a valid path. return "/" + withoutPrefix; } //# sourceMappingURL=remove-path-prefix.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash }; if (basePath && pathHasPrefix(info.pathname, basePath)) { info.pathname = removePathPrefix(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; // update pathname with normalized if enabled although // we use normalized to populate locale info still if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } // If provided, use the locale route normalizer to detect the locale instead // of the function below. if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } //# sourceMappingURL=get-next-pathname-info.js.map ;// ./node_modules/next/dist/esm/server/web/next-url.js const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = getNextPathnameInfo(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !undefined, i18nProvider: this[Internal].options.i18nProvider }); const hostname = getHostname(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return formatNextPathnameInfo({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js var _edge_runtime_cookies = __webpack_require__(443); ;// ./node_modules/next/dist/esm/server/web/spec-extension/cookies.js //# sourceMappingURL=cookies.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/request.js const INTERNALS = Symbol('internal request'); /** * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods. * * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request) */ class NextRequest extends Request { constructor(input, init = {}){ const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); validateURL(url); // node Request instance requires duplex option when a body // is present or it errors, we don't handle this for // Request being passed in since it would have already // errored if this wasn't configured if (false) {} if (input instanceof Request) super(input, init); else super(url, init); const nextUrl = new NextURL(url, { headers: toNodeOutgoingHttpHeaders(this.headers), nextConfig: init.nextConfig }); this[INTERNALS] = { cookies: new _edge_runtime_cookies.RequestCookies(this.headers), nextUrl, url: false ? 0 : nextUrl.toString() }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, nextUrl: this.nextUrl, url: this.url, // rest of props come from Request bodyUsed: this.bodyUsed, cache: this.cache, credentials: this.credentials, destination: this.destination, headers: Object.fromEntries(this.headers), integrity: this.integrity, keepalive: this.keepalive, method: this.method, mode: this.mode, redirect: this.redirect, referrer: this.referrer, referrerPolicy: this.referrerPolicy, signal: this.signal }; } get cookies() { return this[INTERNALS].cookies; } get nextUrl() { return this[INTERNALS].nextUrl; } /** * @deprecated * `page` has been deprecated in favour of `URLPattern`. * Read more: https://nextjs.org/docs/messages/middleware-request-page */ get page() { throw new RemovedPageError(); } /** * @deprecated * `ua` has been removed in favour of \`userAgent\` function. * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent */ get ua() { throw new RemovedUAError(); } get url() { return this[INTERNALS].url; } } //# sourceMappingURL=request.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/response.js const response_INTERNALS = Symbol('internal response'); const REDIRECTS = new Set([ 301, 302, 303, 307, 308 ]); function handleMiddlewareField(init, headers) { var _init_request; if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { if (!(init.request.headers instanceof Headers)) { throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { value: "E119", enumerable: false, configurable: true }); } const keys = []; for (const [key, value] of init.request.headers){ headers.set('x-middleware-request-' + key, value); keys.push(key); } headers.set('x-middleware-override-headers', keys.join(',')); } } /** * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods. * * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response) */ class NextResponse extends Response { constructor(body, init = {}){ super(body, init); const headers = this.headers; const cookies = new _edge_runtime_cookies.ResponseCookies(headers); const cookiesProxy = new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'delete': case 'set': { return (...args)=>{ const result = Reflect.apply(target[prop], target, args); const newHeaders = new Headers(headers); if (result instanceof _edge_runtime_cookies.ResponseCookies) { headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>(0,_edge_runtime_cookies.stringifyCookie)(cookie)).join(',')); } handleMiddlewareField(init, newHeaders); return result; }; } default: return ReflectAdapter.get(target, prop, receiver); } } }); this[response_INTERNALS] = { cookies: cookiesProxy, url: init.url ? new NextURL(init.url, { headers: toNodeOutgoingHttpHeaders(headers), nextConfig: init.nextConfig }) : undefined }; } [Symbol.for('edge-runtime.inspect.custom')]() { return { cookies: this.cookies, url: this.url, // rest of props come from Response body: this.body, bodyUsed: this.bodyUsed, headers: Object.fromEntries(this.headers), ok: this.ok, redirected: this.redirected, status: this.status, statusText: this.statusText, type: this.type }; } get cookies() { return this[response_INTERNALS].cookies; } static json(body, init) { const response = Response.json(body, init); return new NextResponse(response.body, response); } static redirect(url, init) { const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; if (!REDIRECTS.has(status)) { throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { value: "E529", enumerable: false, configurable: true }); } const initObj = typeof init === 'object' ? init : {}; const headers = new Headers(initObj == null ? void 0 : initObj.headers); headers.set('Location', validateURL(url)); return new NextResponse(null, { ...initObj, headers, status }); } static rewrite(destination, init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-rewrite', validateURL(destination)); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } static next(init) { const headers = new Headers(init == null ? void 0 : init.headers); headers.set('x-middleware-next', '1'); handleMiddlewareField(init, headers); return new NextResponse(null, { ...init, headers }); } } //# sourceMappingURL=response.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js /** * The result of parsing a URL relative to a base URL. */ function parseRelativeURL(url, base) { const baseURL = typeof base === 'string' ? new URL(base) : base; const relative = new URL(url, base); // The URL is relative if the origin is the same as the base URL. const isRelative = relative.origin === baseURL.origin; return { url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), isRelative }; } /** * Given a URL as a string and a base URL it will make the URL relative * if the parsed protocol and host is the same as the one in the base * URL. Otherwise it returns the same URL string. */ function getRelativeURL(url, base) { const relative = parseRelativeURL(url, base); return relative.url; } //# sourceMappingURL=relativize-url.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/server/internal-utils.js const INTERNAL_QUERY_NAMES = [ NEXT_RSC_UNION_QUERY ]; function stripInternalQueries(query) { for (const name of INTERNAL_QUERY_NAMES){ delete query[name]; } } function stripInternalSearchParams(url) { const isStringUrl = typeof url === 'string'; const instance = isStringUrl ? new URL(url) : url; instance.searchParams.delete(NEXT_RSC_UNION_QUERY); return isStringUrl ? instance.toString() : instance; } //# sourceMappingURL=internal-utils.js.map ;// ./node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js /** * For a given page path, this function ensures that there is a leading slash. * If there is not a leading slash, one is added, otherwise it is noop. */ function ensureLeadingSlash(path) { return path.startsWith('/') ? path : "/" + path; } //# sourceMappingURL=ensure-leading-slash.js.map ;// ./node_modules/next/dist/esm/shared/lib/segment.js function isGroupSegment(segment) { // Use array[0] for performant purpose return segment[0] === '(' && segment.endsWith(')'); } function isParallelRouteSegment(segment) { return segment.startsWith('@') && segment !== '@children'; } function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } const PAGE_SEGMENT_KEY = '__PAGE__'; const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map ;// ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js /** * Normalizes an app route so it represents the actual request path. Essentially * performing the following transformations: * * - `/(dashboard)/user/[id]/page` to `/user/[id]` * - `/(dashboard)/account/page` to `/account` * - `/user/[id]/page` to `/user/[id]` * - `/account/page` to `/account` * - `/page` to `/` * - `/(dashboard)/user/[id]/route` to `/user/[id]` * - `/(dashboard)/account/route` to `/account` * - `/user/[id]/route` to `/user/[id]` * - `/account/route` to `/account` * - `/route` to `/` * - `/` to `/` * * @param route the app route to normalize * @returns the normalized pathname */ function normalizeAppPath(route) { return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if (isGroupSegment(segment)) { return pathname; } // Parallel segments are ignored. if (segment[0] === '@') { return pathname; } // The last segment (if it's a leaf) should be ignored. if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, '')); } /** * Strips the `.rsc` extension if it's in the pathname. * Since this function is used on full urls it checks `?` for searchParams handling. */ function normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js /** * @internal */ class ReadonlyHeadersError extends Error { constructor(){ super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); } static callable() { throw new ReadonlyHeadersError(); } } class HeadersAdapter extends Headers { constructor(headers){ // We've already overridden the methods that would be called, so we're just // calling the super constructor to ensure that the instanceof check works. super(); this.headers = new Proxy(headers, { get (target, prop, receiver) { // Because this is just an object, we expect that all "get" operations // are for properties. If it's a "get" for a symbol, we'll just return // the symbol. if (typeof prop === 'symbol') { return ReflectAdapter.get(target, prop, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return undefined. if (typeof original === 'undefined') return; // If the original casing exists, return the value. return ReflectAdapter.get(target, original, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'symbol') { return ReflectAdapter.set(target, prop, value, receiver); } const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, use the prop as the key. return ReflectAdapter.set(target, original ?? prop, value, receiver); }, has (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return false. if (typeof original === 'undefined') return false; // If the original casing exists, return true. return ReflectAdapter.has(target, original); }, deleteProperty (target, prop) { if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop); const lowercased = prop.toLowerCase(); // Let's find the original casing of the key. This assumes that there is // no mixed case keys (e.g. "Content-Type" and "content-type") in the // headers object. const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); // If the original casing doesn't exist, return true. if (typeof original === 'undefined') return true; // If the original casing exists, delete the property. return ReflectAdapter.deleteProperty(target, original); } }); } /** * Seals a Headers instance to prevent modification by throwing an error when * any mutating method is called. */ static seal(headers) { return new Proxy(headers, { get (target, prop, receiver) { switch(prop){ case 'append': case 'delete': case 'set': return ReadonlyHeadersError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } /** * Merges a header value into a string. This stores multiple values as an * array, so we need to merge them into a string. * * @param value a header value * @returns a merged header value (a string) */ merge(value) { if (Array.isArray(value)) return value.join(', '); return value; } /** * Creates a Headers instance from a plain object or a Headers instance. * * @param headers a plain object or a Headers instance * @returns a headers instance */ static from(headers) { if (headers instanceof Headers) return headers; return new HeadersAdapter(headers); } append(name, value) { const existing = this.headers[name]; if (typeof existing === 'string') { this.headers[name] = [ existing, value ]; } else if (Array.isArray(existing)) { existing.push(value); } else { this.headers[name] = value; } } delete(name) { delete this.headers[name]; } get(name) { const value = this.headers[name]; if (typeof value !== 'undefined') return this.merge(value); return null; } has(name) { return typeof this.headers[name] !== 'undefined'; } set(name, value) { this.headers[name] = value; } forEach(callbackfn, thisArg) { for (const [name, value] of this.entries()){ callbackfn.call(thisArg, value, name, this); } } *entries() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(name); yield [ name, value ]; } } *keys() { for (const key of Object.keys(this.headers)){ const name = key.toLowerCase(); yield name; } } *values() { for (const key of Object.keys(this.headers)){ // We assert here that this is a string because we got it from the // Object.keys() call above. const value = this.get(key); yield value; } } [Symbol.iterator]() { return this.entries(); } } //# sourceMappingURL=headers.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class FakeAsyncLocalStorage { disable() { throw sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw sharedAsyncLocalStorageNotAvailableError; } exit() { throw sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function async_local_storage_createAsyncLocalStorage() { if (maybeGlobalAsyncLocalStorage) { return new maybeGlobalAsyncLocalStorage(); } return new FakeAsyncLocalStorage(); } function bindSnapshot(fn) { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.bind(fn); } return FakeAsyncLocalStorage.bind(fn); } function createSnapshot() { if (maybeGlobalAsyncLocalStorage) { return maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js const workAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=work-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js /** * @internal */ class ReadonlyRequestCookiesError extends Error { constructor(){ super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); } static callable() { throw new ReadonlyRequestCookiesError(); } } class request_cookies_RequestCookiesAdapter { static seal(cookies) { return new Proxy(cookies, { get (target, prop, receiver) { switch(prop){ case 'clear': case 'delete': case 'set': return ReadonlyRequestCookiesError.callable; default: return ReflectAdapter.get(target, prop, receiver); } } }); } } const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); function getModifiedCookieValues(cookies) { const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; if (!modified || !Array.isArray(modified) || modified.length === 0) { return []; } return modified; } function appendMutableCookies(headers, mutableCookies) { const modifiedCookieValues = getModifiedCookieValues(mutableCookies); if (modifiedCookieValues.length === 0) { return false; } // Return a new response that extends the response with // the modified cookies as fallbacks. `res` cookies // will still take precedence. const resCookies = new ResponseCookies(headers); const returnedCookies = resCookies.getAll(); // Set the modified cookies as fallbacks. for (const cookie of modifiedCookieValues){ resCookies.set(cookie); } // Set the original cookies as the final values. for (const cookie of returnedCookies){ resCookies.set(cookie); } return true; } class MutableRequestCookiesAdapter { static wrap(cookies, onUpdateCookies) { const responseCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); for (const cookie of cookies.getAll()){ responseCookies.set(cookie); } let modifiedValues = []; const modifiedCookies = new Set(); const updateResponseCookies = ()=>{ // TODO-APP: change method of getting workStore const workStore = workAsyncStorageInstance.getStore(); if (workStore) { workStore.pathWasRevalidated = true; } const allCookies = responseCookies.getAll(); modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); if (onUpdateCookies) { const serializedCookies = []; for (const cookie of modifiedValues){ const tempCookies = new _edge_runtime_cookies.ResponseCookies(new Headers()); tempCookies.set(cookie); serializedCookies.push(tempCookies.toString()); } onUpdateCookies(serializedCookies); } }; const wrappedCookies = new Proxy(responseCookies, { get (target, prop, receiver) { switch(prop){ // A special symbol to get the modified cookie values case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues; // TODO: Throw error if trying to set a cookie after the response // headers have been set. case 'delete': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.delete(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; case 'set': return function(...args) { modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); try { target.set(...args); return wrappedCookies; } finally{ updateResponseCookies(); } }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } } function createCookiesWithMutableAccessCheck(requestStore) { const wrappedCookies = new Proxy(requestStore.mutableCookies, { get (target, prop, receiver) { switch(prop){ case 'delete': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); target.delete(...args); return wrappedCookies; }; case 'set': return function(...args) { ensureCookiesAreStillMutable(requestStore, 'cookies().set'); target.set(...args); return wrappedCookies; }; default: return ReflectAdapter.get(target, prop, receiver); } } }); return wrappedCookies; } function areCookiesMutableInCurrentPhase(requestStore) { return requestStore.phase === 'action'; } /** Ensure that cookies() starts throwing on mutation * if we changed phases and can no longer mutate. * * This can happen when going: * 'render' -> 'after' * 'action' -> 'render' * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { if (!areCookiesMutableInCurrentPhase(requestStore)) { // TODO: maybe we can give a more precise error message based on callingExpression? throw new ReadonlyRequestCookiesError(); } } function request_cookies_responseCookiesToRequestCookies(responseCookies) { const requestCookies = new RequestCookies(new Headers()); for (const cookie of responseCookies.getAll()){ requestCookies.set(cookie); } return requestCookies; } //# sourceMappingURL=request-cookies.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/constants.js /** * Contains predefined constants for the trace span name in next/server. * * Currently, next/server/tracer is internal implementation only for tracking * next.js's implementation only with known span names defined here. **/ // eslint typescript has a bug with TS enums /* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; BaseServerSpan["run"] = "BaseServer.run"; BaseServerSpan["pipe"] = "BaseServer.pipe"; BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; BaseServerSpan["render"] = "BaseServer.render"; BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; BaseServerSpan["renderError"] = "BaseServer.renderError"; BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; BaseServerSpan["render404"] = "BaseServer.render404"; return BaseServerSpan; }(BaseServerSpan || {}); var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; return LoadComponentsSpan; }(LoadComponentsSpan || {}); var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; NextServerSpan["getServer"] = "NextServer.getServer"; NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; NextServerSpan["createServer"] = "createServer.createServer"; return NextServerSpan; }(NextServerSpan || {}); var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { NextNodeServerSpan["compression"] = "NextNodeServer.compression"; NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; NextNodeServerSpan["render"] = "NextNodeServer.render"; NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; NextNodeServerSpan["render404"] = "NextNodeServer.render404"; NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; // nested inner span, does not require parent scope name NextNodeServerSpan["route"] = "route"; NextNodeServerSpan["onProxyReq"] = "onProxyReq"; NextNodeServerSpan["apiResolver"] = "apiResolver"; NextNodeServerSpan["internalFetch"] = "internalFetch"; return NextNodeServerSpan; }(NextNodeServerSpan || {}); var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { StartServerSpan["startServer"] = "startServer.startServer"; return StartServerSpan; }(StartServerSpan || {}); var RenderSpan = /*#__PURE__*/ function(RenderSpan) { RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; RenderSpan["getStaticProps"] = "Render.getStaticProps"; RenderSpan["renderToString"] = "Render.renderToString"; RenderSpan["renderDocument"] = "Render.renderDocument"; RenderSpan["createBodyResult"] = "Render.createBodyResult"; return RenderSpan; }(RenderSpan || {}); var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { AppRenderSpan["renderToString"] = "AppRender.renderToString"; AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; AppRenderSpan["fetch"] = "AppRender.fetch"; return AppRenderSpan; }(AppRenderSpan || {}); var RouterSpan = /*#__PURE__*/ function(RouterSpan) { RouterSpan["executeRoute"] = "Router.executeRoute"; return RouterSpan; }(RouterSpan || {}); var constants_NodeSpan = /*#__PURE__*/ function(NodeSpan) { NodeSpan["runHandler"] = "Node.runHandler"; return NodeSpan; }(constants_NodeSpan || {}); var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; return AppRouteRouteHandlersSpan; }(AppRouteRouteHandlersSpan || {}); var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; return ResolveMetadataSpan; }(ResolveMetadataSpan || {}); var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { MiddlewareSpan["execute"] = "Middleware.execute"; return MiddlewareSpan; }(MiddlewareSpan || {}); // This list is used to filter out spans that are not relevant to the user const NextVanillaSpanAllowlist = new Set([ "Middleware.execute", "BaseServer.handleRequest", "Render.getServerSideProps", "Render.getStaticProps", "AppRender.fetch", "AppRender.getBodyResult", "Render.renderDocument", "Node.runHandler", "AppRouteRouteHandlers.runHandler", "ResolveMetadata.generateMetadata", "ResolveMetadata.generateViewport", "NextNodeServer.createComponentTree", "NextNodeServer.findPageComponents", "NextNodeServer.getLayoutOrPageModule", "NextNodeServer.startResponse", "NextNodeServer.clientComponentLoading" ]); // These Spans are allowed to be always logged // when the otel log prefix env is set const LogSpanAllowList = new Set([ "NextNodeServer.findPageComponents", "NextNodeServer.createComponentTree", "NextNodeServer.clientComponentLoading" ]); //# sourceMappingURL=constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/is-thenable.js /** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map ;// ./node_modules/next/dist/esm/server/lib/trace/tracer.js const NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX; let api; // we want to allow users to use their own version of @opentelemetry/api if they // want to, so we try to require it first, and if it fails we fall back to the // version that is bundled with Next.js // this is because @opentelemetry/api has to be synced with the version of // @opentelemetry/tracing that is used, and we don't want to force users to use // the version that is bundled with Next.js. // the API is ~stable, so this should be fine if (true) { api = __webpack_require__(817); } else {} const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; class BubbledError extends Error { constructor(bubble, result){ super(), this.bubble = bubble, this.result = result; } } function isBubbledError(error) { if (typeof error !== 'object' || error === null) return false; return error instanceof BubbledError; } const closeSpanWithError = (span, error)=>{ if (isBubbledError(error) && error.bubble) { span.setAttribute('next.bubble', true); } else { if (error) { span.recordException(error); span.setAttribute('error.type', error.name); } span.setStatus({ code: SpanStatusCode.ERROR, message: error == null ? void 0 : error.message }); } span.end(); }; /** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); const rootSpanIdKey = api.createContextKey('next.rootSpanId'); let lastSpanId = 0; const getSpanId = ()=>lastSpanId++; const clientTraceDataSetter = { set (carrier, key, value) { carrier.push({ key, value }); } }; class NextTracerImpl { /** * Returns an instance to the trace with configured name. * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, * This should be lazily evaluated. */ getTracerInstance() { return trace.getTracer('next.js', '0.0.1'); } getContext() { return context; } getTracePropagationData() { const activeContext = context.active(); const entries = []; propagation.inject(activeContext, entries, clientTraceDataSetter); return entries; } getActiveScopeSpan() { return trace.getSpan(context == null ? void 0 : context.active()); } withPropagatedContext(carrier, fn, getter) { const activeContext = context.active(); if (trace.getSpanContext(activeContext)) { // Active span is already set, too late to propagate. return fn(); } const remoteContext = propagation.extract(activeContext, carrier, getter); return context.with(remoteContext, fn); } trace(...args) { var _trace_getSpanContext; const [type, fnOrOptions, fnOrEmpty] = args; // coerce options form overload const { fn, options } = typeof fnOrOptions === 'function' ? { fn: fnOrOptions, options: {} } : { fn: fnOrEmpty, options: { ...fnOrOptions } }; const spanName = options.spanName ?? type; if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { return fn(); } // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); let isRootSpan = false; if (!spanContext) { spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; isRootSpan = true; } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { isRootSpan = true; } const spanId = getSpanId(); options.attributes = { 'next.span_name': spanName, 'next.span_type': type, ...options.attributes }; return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ let startTime; if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) { startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; } let cleanedUp = false; const onCleanup = ()=>{ if (cleanedUp) return; cleanedUp = true; rootSpanAttributesStore.delete(spanId); if (startTime) { performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { start: startTime, end: performance.now() }); } }; if (isRootSpan) { rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); } if (fn.length > 1) { try { return fn(span, (err)=>closeSpanWithError(span, err)); } catch (err) { closeSpanWithError(span, err); throw err; } finally{ onCleanup(); } } try { const result = fn(span); if (isThenable(result)) { // If there's error make sure it throws return result.then((res)=>{ span.end(); // Need to pass down the promise result, // it could be react stream response with error { error, stream } return res; }).catch((err)=>{ closeSpanWithError(span, err); throw err; }).finally(onCleanup); } else { span.end(); onCleanup(); } return result; } catch (err) { closeSpanWithError(span, err); onCleanup(); throw err; } })); } wrap(...args) { const tracer = this; const [name, options, fn] = args.length === 3 ? args : [ args[0], {}, args[1] ]; if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { return fn; } return function() { let optionsObj = options; if (typeof optionsObj === 'function' && typeof fn === 'function') { optionsObj = optionsObj.apply(this, arguments); } const lastArgId = arguments.length - 1; const cb = arguments[lastArgId]; if (typeof cb === 'function') { const scopeBoundCb = tracer.getContext().bind(context.active(), cb); return tracer.trace(name, optionsObj, (_span, done)=>{ arguments[lastArgId] = function(err) { done == null ? void 0 : done(err); return scopeBoundCb.apply(this, arguments); }; return fn.apply(this, arguments); }); } else { return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); } }; } startSpan(...args) { const [type, options] = args; const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); return this.getTracerInstance().startSpan(type, options, spanContext); } getSpanContext(parentSpan) { const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; return spanContext; } getRootSpanAttributes() { const spanId = context.active().getValue(rootSpanIdKey); return rootSpanAttributesStore.get(spanId); } setRootSpanAttribute(key, value) { const spanId = context.active().getValue(rootSpanIdKey); const attributes = rootSpanAttributesStore.get(spanId); if (attributes) { attributes.set(key, value); } } } const tracer_getTracer = (()=>{ const tracer = new NextTracerImpl(); return ()=>tracer; })(); //# sourceMappingURL=tracer.js.map ;// ./node_modules/next/dist/esm/server/api-utils/index.js function wrapApiHandler(page, handler) { return (...args)=>{ getTracer().setRootSpanAttribute('next.route', page); // Call API route method return getTracer().trace(NodeSpan.runHandler, { spanName: `executing api route (pages) ${page}` }, ()=>handler(...args)); }; } /** * * @param res response object * @param statusCode `HTTP` status code of response */ function sendStatusCode(res, statusCode) { res.statusCode = statusCode; return res; } /** * * @param res response object * @param [statusOrUrl] `HTTP` status code of redirect * @param url URL of redirect */ function redirect(res, statusOrUrl, url) { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; } if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), "__NEXT_ERROR_CODE", { value: "E389", enumerable: false, configurable: true }); } res.writeHead(statusOrUrl, { Location: url }); res.write(url); res.end(); return res; } function checkIsOnDemandRevalidate(req, previewProps) { const headers = HeadersAdapter.from(req.headers); const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER); const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER); return { isOnDemandRevalidate, revalidateOnlyGenerated }; } const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; const RESPONSE_LIMIT_DEFAULT = (/* unused pure expression or super */ null && (4 * 1024 * 1024)); const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); function clearPreviewData(res, options = {}) { if (SYMBOL_CLEARED_COOKIES in res) { return res; } const { serialize } = __webpack_require__(663); const previous = res.getHeader('Set-Cookie'); res.setHeader(`Set-Cookie`, [ ...typeof previous === 'string' ? [ previous ] : Array.isArray(previous) ? previous : [], serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. expires: new Date(0), httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', ...options.path !== undefined ? { path: options.path } : undefined }) ]); Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { value: true, enumerable: false }); return res; } /** * Custom error class */ class ApiError extends Error { constructor(statusCode, message){ super(message); this.statusCode = statusCode; } } /** * Sends error in `response` * @param res response object * @param statusCode of response * @param message of response */ function sendError(res, statusCode, message) { res.statusCode = statusCode; res.statusMessage = message; res.end(message); } /** * Execute getter function only if its needed * @param LazyProps `req` and `params` for lazyProp * @param prop name of property * @param getter function to get data */ function setLazyProp({ req }, prop, getter) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; Object.defineProperty(req, prop, { ...opts, get: ()=>{ const value = getter(); // we set the property on the object to avoid recalculating it Object.defineProperty(req, prop, { ...optsReset, value }); return value; }, set: (value)=>{ Object.defineProperty(req, prop, { ...optsReset, value }); } }); } //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js class DraftModeProvider { constructor(previewProps, req, cookies, mutableCookies){ var _cookies_get; // The logic for draftMode() is very similar to tryGetPreviewData() // but Draft Mode does not have any data associated with it. const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate; const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value; this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. false && 0)); this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; this._mutableCookies = mutableCookies; } get isEnabled() { return this._isEnabled; } enable() { if (!this._previewModeId) { throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { value: "E93", enumerable: false, configurable: true }); } this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: this._previewModeId, httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/' }); this._isEnabled = true; } disable() { // To delete a cookie, set `expires` to a date in the past: // https://tools.ietf.org/html/rfc6265#section-4.1.1 // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. this._mutableCookies.set({ name: COOKIE_NAME_PRERENDER_BYPASS, value: '', httpOnly: true, sameSite: true ? 'none' : 0, secure: "production" !== 'development', path: '/', expires: new Date(0) }); this._isEnabled = false; } } //# sourceMappingURL=draft-mode-provider.js.map ;// ./node_modules/next/dist/esm/server/async-storage/request-store.js function getHeaders(headers) { const cleaned = HeadersAdapter.from(headers); for (const header of FLIGHT_HEADERS){ cleaned.delete(header); } return HeadersAdapter.seal(cleaned); } function getMutableCookies(headers, onUpdateCookies) { const cookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(headers)); return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies); } /** * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), * then merge those into the existing cookie object, so that when `cookies()` is accessed * it's able to read the newly set cookies. */ function mergeMiddlewareCookies(req, existingCookies) { if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { const setCookieValue = req.headers['x-middleware-set-cookie']; const responseHeaders = new Headers(); for (const cookie of splitCookiesString(setCookieValue)){ responseHeaders.append('set-cookie', cookie); } const responseCookies = new _edge_runtime_cookies.ResponseCookies(responseHeaders); // Transfer cookies from ResponseCookies to RequestCookies for (const cookie of responseCookies.getAll()){ existingCookies.set(cookie); } } } function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { return createRequestStoreImpl(// Pages start in render phase by default 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); } function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { return createRequestStoreImpl(// API routes start in action phase by default 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); } function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { function defaultOnUpdateCookies(cookies) { if (res) { res.setHeader('Set-Cookie', cookies); } } const cache = {}; return { type: 'request', phase, implicitTags, // Rather than just using the whole `url` here, we pull the parts we want // to ensure we don't use parts of the URL that we shouldn't. This also // lets us avoid requiring an empty string for `search` in the type. url: { pathname: url.pathname, search: url.search ?? '' }, rootParams, get headers () { if (!cache.headers) { // Seal the headers object that'll freeze out any methods that could // mutate the underlying data. cache.headers = getHeaders(req.headers); } return cache.headers; }, get cookies () { if (!cache.cookies) { // if middleware is setting cookie(s), then include those in // the initial cached cookies so they can be read in render const requestCookies = new _edge_runtime_cookies.RequestCookies(HeadersAdapter.from(req.headers)); mergeMiddlewareCookies(req, requestCookies); // Seal the cookies object that'll freeze out any methods that could // mutate the underlying data. cache.cookies = request_cookies_RequestCookiesAdapter.seal(requestCookies); } return cache.cookies; }, set cookies (value){ cache.cookies = value; }, get mutableCookies () { if (!cache.mutableCookies) { const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); mergeMiddlewareCookies(req, mutableCookies); cache.mutableCookies = mutableCookies; } return cache.mutableCookies; }, get userspaceMutableCookies () { if (!cache.userspaceMutableCookies) { const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this); cache.userspaceMutableCookies = userspaceMutableCookies; } return cache.userspaceMutableCookies; }, get draftMode () { if (!cache.draftMode) { cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies); } return cache.draftMode; }, renderResumeDataCache: renderResumeDataCache ?? null, isHmrRefresh, serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, devFallbackParams }; } function synchronizeMutableCookies(store) { // TODO: does this need to update headers as well? store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies)); } //# sourceMappingURL=request-store.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js const workUnitAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=work-unit-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/client/components/app-router-headers.js const app_router_headers_RSC_HEADER = 'rsc'; const app_router_headers_ACTION_HEADER = 'next-action'; // TODO: Instead of sending the full router state, we only need to send the // segment path. Saves bytes. Then we could also use this field for segment // prefetches, which also need to specify a particular segment. const app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const app_router_headers_NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; // This contains the path to the segment being prefetched. // TODO: If we change next-router-state-tree to be a segment path, we can use // that instead. Then next-router-prefetch and next-router-segment-prefetch can // be merged into a single enum. const app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const app_router_headers_NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const components_app_router_headers_NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const app_router_headers_NEXT_URL = 'next-url'; const app_router_headers_RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const app_router_headers_FLIGHT_HEADERS = [ app_router_headers_RSC_HEADER, app_router_headers_NEXT_ROUTER_STATE_TREE_HEADER, app_router_headers_NEXT_ROUTER_PREFETCH_HEADER, app_router_headers_NEXT_HMR_REFRESH_HEADER, app_router_headers_NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const app_router_headers_NEXT_RSC_UNION_QUERY = '_rsc'; const app_router_headers_NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const app_router_headers_NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const app_router_headers_NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const app_router_headers_NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const app_router_headers_NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const app_router_headers_NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js // Share the instance module in the next-shared layer function work_unit_async_storage_external_throwForMissingRequestStore(callingExpression) { throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { value: "E251", enumerable: false, configurable: true }); } function throwInvariantForMissingStore() { throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { value: "E696", enumerable: false, configurable: true }); } function getPrerenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': case 'prerender-ppr': return workUnitStore.prerenderResumeDataCache; case 'prerender-client': // TODO eliminate fetch caching in client scope and stop exposing this data // cache during SSR. return workUnitStore.prerenderResumeDataCache; case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function getRenderResumeDataCache(workUnitStore) { switch(workUnitStore.type){ case 'request': return workUnitStore.renderResumeDataCache; case 'prerender': case 'prerender-runtime': case 'prerender-client': if (workUnitStore.renderResumeDataCache) { // If we are in a prerender, we might have a render resume data cache // that is used to read from prefilled caches. return workUnitStore.renderResumeDataCache; } // fallthrough case 'prerender-ppr': // Otherwise we return the mutable resume data cache here as an immutable // version of the cache as it can also be used for reading. return workUnitStore.prerenderResumeDataCache; case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-legacy': return null; default: return workUnitStore; } } function getHmrRefreshHash(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'prerender': case 'prerender-runtime': return workUnitStore.hmrRefreshHash; case 'request': var _workUnitStore_cookies_get; return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } function isHmrRefresh(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.isHmrRefresh ?? false; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return false; } function getServerComponentsHmrCache(workStore, workUnitStore) { if (workStore.dev) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'request': return workUnitStore.serverComponentsHmrCache; case 'prerender': case 'prerender-client': case 'prerender-runtime': case 'prerender-ppr': case 'prerender-legacy': case 'unstable-cache': break; default: workUnitStore; } } return undefined; } /** * Returns a draft mode provider only if draft mode is enabled. */ function getDraftModeProviderForCacheScope(workStore, workUnitStore) { if (workStore.isDraftMode) { switch(workUnitStore.type){ case 'cache': case 'private-cache': case 'unstable-cache': case 'prerender-runtime': case 'request': return workUnitStore.draftMode; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': break; default: workUnitStore; } } return undefined; } function getCacheSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-runtime': return workUnitStore.cacheSignal; case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return null; default: return workUnitStore; } } function work_unit_async_storage_external_getRuntimeStagePromise(workUnitStore) { switch(workUnitStore.type){ case 'prerender-runtime': case 'private-cache': return workUnitStore.runtimeStagePromise; case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'unstable-cache': return null; default: return workUnitStore; } } //# sourceMappingURL=work-unit-async-storage.external.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/p-queue/index.js var p_queue = __webpack_require__(213); var p_queue_default = /*#__PURE__*/__webpack_require__.n(p_queue); ;// ./node_modules/next/dist/esm/shared/lib/invariant-error.js class lib_invariant_error_InvariantError extends Error { constructor(message, options){ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); this.name = 'InvariantError'; } } //# sourceMappingURL=invariant-error.js.map ;// ./node_modules/next/dist/esm/server/lib/lru-cache.js /** * Node in the doubly-linked list used for LRU tracking. * Each node represents a cache entry with bidirectional pointers. */ class LRUNode { constructor(key, data, size){ this.prev = null; this.next = null; this.key = key; this.data = data; this.size = size; } } /** * Sentinel node used for head/tail boundaries. * These nodes don't contain actual cache data but simplify list operations. */ class SentinelNode { constructor(){ this.prev = null; this.next = null; } } /** * LRU (Least Recently Used) Cache implementation using a doubly-linked list * and hash map for O(1) operations. * * Algorithm: * - Uses a doubly-linked list to maintain access order (most recent at head) * - Hash map provides O(1) key-to-node lookup * - Sentinel head/tail nodes simplify edge case handling * - Size-based eviction supports custom size calculation functions * * Data Structure Layout: * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL * * Operations: * - get(): Move accessed node to head (mark as most recent) * - set(): Add new node at head, evict from tail if over capacity * - Eviction: Remove least recent node (tail.prev) when size exceeds limit */ class LRUCache { constructor(maxSize, calculateSize, onEvict){ this.cache = new Map(); this.totalSize = 0; this.maxSize = maxSize; this.calculateSize = calculateSize; this.onEvict = onEvict; // Create sentinel nodes to simplify doubly-linked list operations // HEAD <-> TAIL (empty list) this.head = new SentinelNode(); this.tail = new SentinelNode(); this.head.next = this.tail; this.tail.prev = this.head; } /** * Adds a node immediately after the head (marks as most recently used). * Used when inserting new items or when an item is accessed. * PRECONDITION: node must be disconnected (prev/next should be null) */ addToHead(node) { node.prev = this.head; node.next = this.head.next; // head.next is always non-null (points to tail or another node) this.head.next.prev = node; this.head.next = node; } /** * Removes a node from its current position in the doubly-linked list. * Updates the prev/next pointers of adjacent nodes to maintain list integrity. * PRECONDITION: node must be connected (prev/next are non-null) */ removeNode(node) { // Connected nodes always have non-null prev/next node.prev.next = node.next; node.next.prev = node.prev; } /** * Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent. */ moveToHead(node) { this.removeNode(node); this.addToHead(node); } /** * Removes and returns the least recently used node (the one before tail). * This is called during eviction when the cache exceeds capacity. * PRECONDITION: cache is not empty (ensured by caller) */ removeTail() { const lastNode = this.tail.prev; // tail.prev is always non-null and always LRUNode when cache is not empty this.removeNode(lastNode); return lastNode; } /** * Sets a key-value pair in the cache. * If the key exists, updates the value and moves to head. * If new, adds at head and evicts from tail if necessary. * * Time Complexity: * - O(1) for uniform item sizes * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) */ set(key, value) { const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; if (size <= 0) { throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", { value: "E789", enumerable: false, configurable: true }); } if (size > this.maxSize) { console.warn('Single item size exceeds maxSize'); return false; } const existing = this.cache.get(key); if (existing) { // Update existing node: adjust size and move to head (most recent) existing.data = value; this.totalSize = this.totalSize - existing.size + size; existing.size = size; this.moveToHead(existing); } else { // Add new node at head (most recent position) const newNode = new LRUNode(key, value, size); this.cache.set(key, newNode); this.addToHead(newNode); this.totalSize += size; } // Evict least recently used items until under capacity while(this.totalSize > this.maxSize && this.cache.size > 0){ const tail = this.removeTail(); this.cache.delete(tail.key); this.totalSize -= tail.size; this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data); } return true; } /** * Checks if a key exists in the cache. * This is a pure query operation - does NOT update LRU order. * * Time Complexity: O(1) */ has(key) { return this.cache.has(key); } /** * Retrieves a value by key and marks it as most recently used. * Moving to head maintains the LRU property for future evictions. * * Time Complexity: O(1) */ get(key) { const node = this.cache.get(key); if (!node) return undefined; // Mark as most recently used by moving to head this.moveToHead(node); return node.data; } /** * Returns an iterator over the cache entries. The order is outputted in the * order of most recently used to least recently used. */ *[Symbol.iterator]() { let current = this.head.next; while(current && current !== this.tail){ // Between head and tail, current is always LRUNode const node = current; yield [ node.key, node.data ]; current = current.next; } } /** * Removes a specific key from the cache. * Updates both the hash map and doubly-linked list. * * Note: This is an explicit removal and does NOT trigger the `onEvict` * callback. Use this for intentional deletions where eviction tracking * is not needed. * * Time Complexity: O(1) */ remove(key) { const node = this.cache.get(key); if (!node) return; this.removeNode(node); this.cache.delete(key); this.totalSize -= node.size; } /** * Returns the number of items in the cache. */ get size() { return this.cache.size; } /** * Returns the current total size of all cached items. * This uses the custom size calculation if provided. */ get currentSize() { return this.totalSize; } } //# sourceMappingURL=lru-cache.js.map ;// ./node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js // We share the tags manifest between the "use cache" handlers and the previous // file-system cache. const tagsManifest = new Map(); const isStale = (tags, timestamp)=>{ for (const tag of tags){ const revalidatedAt = tagsManifest.get(tag); if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { return true; } } return false; }; //# sourceMappingURL=tags-manifest.external.js.map ;// ./node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js /* provided dependency */ var Buffer = __webpack_require__(356)["Buffer"]; /** * This is the default "use cache" handler it defaults to an in-memory store. * In-memory caches are fragile and should not use stale-while-revalidate * semantics on the caches because it's not worth warming up an entry that's * likely going to get evicted before we get to use it anyway. However, we also * don't want to reuse a stale entry for too long so stale entries should be * considered expired/missing in such cache handlers. */ // LRU cache default to max 50 MB but in future track const memoryCache = new LRUCache(50 * 1024 * 1024, (entry)=>entry.size); const pendingSets = new Map(); const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; const default_external_DefaultCacheHandler = { async get (cacheKey) { const pendingPromise = pendingSets.get(cacheKey); if (pendingPromise) { debug == null ? void 0 : debug('get', cacheKey, 'pending'); await pendingPromise; } const privateEntry = memoryCache.get(cacheKey); if (!privateEntry) { debug == null ? void 0 : debug('get', cacheKey, 'not found'); return undefined; } const entry = privateEntry.entry; if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { // In-memory caches should expire after revalidate time because it is // unlikely that a new entry will be able to be used before it is dropped // from the cache. debug == null ? void 0 : debug('get', cacheKey, 'expired'); return undefined; } if (isStale(entry.tags, entry.timestamp)) { debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); return undefined; } const [returnStream, newSaved] = entry.value.tee(); entry.value = newSaved; debug == null ? void 0 : debug('get', cacheKey, 'found', { tags: entry.tags, timestamp: entry.timestamp, revalidate: entry.revalidate, expire: entry.expire }); return { ...entry, value: returnStream }; }, async set (cacheKey, pendingEntry) { debug == null ? void 0 : debug('set', cacheKey, 'start'); let resolvePending = ()=>{}; const pendingPromise = new Promise((resolve)=>{ resolvePending = resolve; }); pendingSets.set(cacheKey, pendingPromise); const entry = await pendingEntry; let size = 0; try { const [value, clonedValue] = entry.value.tee(); entry.value = value; const reader = clonedValue.getReader(); for(let chunk; !(chunk = await reader.read()).done;){ size += Buffer.from(chunk.value).byteLength; } memoryCache.set(cacheKey, { entry, isErrored: false, errorRetryCount: 0, size }); debug == null ? void 0 : debug('set', cacheKey, 'done'); } catch (err) { // TODO: store partial buffer with error after we retry 3 times debug == null ? void 0 : debug('set', cacheKey, 'failed', err); } finally{ resolvePending(); pendingSets.delete(cacheKey); } }, async refreshTags () { // Nothing to do for an in-memory cache handler. }, async getExpiration (...tags) { const expiration = Math.max(...tags.map((tag)=>tagsManifest.get(tag) ?? 0)); debug == null ? void 0 : debug('getExpiration', { tags, expiration }); return expiration; }, async expireTags (...tags) { const timestamp = Math.round(performance.timeOrigin + performance.now()); debug == null ? void 0 : debug('expireTags', { tags, timestamp }); for (const tag of tags){ // TODO: update file-system-cache? tagsManifest.set(tag, timestamp); } } }; /* harmony default export */ const default_external = ((/* unused pure expression or super */ null && (default_external_DefaultCacheHandler))); //# sourceMappingURL=default.external.js.map ;// ./node_modules/next/dist/esm/server/use-cache/handlers.js const handlers_debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ console.log(`use-cache: ${message}`, ...args); } : undefined; const handlersSymbol = Symbol.for('@next/cache-handlers'); const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); /** * The reference to the cache handlers. We store the cache handlers on the * global object so that we can access the same instance across different * boundaries (such as different copies of the same module). */ const reference = globalThis; /** * Initialize the cache handlers. * @returns `true` if the cache handlers were initialized, `false` if they were already initialized. */ function initializeCacheHandlers() { // If the cache handlers have already been initialized, don't do it again. if (reference[handlersMapSymbol]) { handlers_debug == null ? void 0 : handlers_debug('cache handlers already initialized'); return false; } handlers_debug == null ? void 0 : handlers_debug('initializing cache handlers'); reference[handlersMapSymbol] = new Map(); // Initialize the cache from the symbol contents first. if (reference[handlersSymbol]) { let fallback; if (reference[handlersSymbol].DefaultCache) { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from symbol'); fallback = reference[handlersSymbol].DefaultCache; } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); fallback = DefaultCacheHandler; } reference[handlersMapSymbol].set('default', fallback); if (reference[handlersSymbol].RemoteCache) { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from symbol'); reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); } else { handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', fallback); } } else { handlers_debug == null ? void 0 : handlers_debug('setting "default" cache handler from default'); reference[handlersMapSymbol].set('default', DefaultCacheHandler); handlers_debug == null ? void 0 : handlers_debug('setting "remote" cache handler from default'); reference[handlersMapSymbol].set('remote', DefaultCacheHandler); } // Create a set of the cache handlers. reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); return true; } /** * Get a cache handler by kind. * @param kind - The kind of cache handler to get. * @returns The cache handler, or `undefined` if it does not exist. * @throws If the cache handlers are not initialized. */ function getCacheHandler(kind) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } return reference[handlersMapSymbol].get(kind); } /** * Get a set iterator over the cache handlers. * @returns An iterator over the cache handlers, or `undefined` if they are not * initialized. */ function getCacheHandlers() { if (!reference[handlersSetSymbol]) { return undefined; } return reference[handlersSetSymbol].values(); } /** * Get a map iterator over the cache handlers (keyed by kind). * @returns An iterator over the cache handler entries, or `undefined` if they * are not initialized. * @throws If the cache handlers are not initialized. */ function getCacheHandlerEntries() { if (!reference[handlersMapSymbol]) { return undefined; } return reference[handlersMapSymbol].entries(); } /** * Set a cache handler by kind. * @param kind - The kind of cache handler to set. * @param cacheHandler - The cache handler to set. */ function setCacheHandler(kind, cacheHandler) { // This should never be called before initializeCacheHandlers. if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { value: "E649", enumerable: false, configurable: true }); } handlers_debug == null ? void 0 : handlers_debug('setting cache handler for "%s"', kind); reference[handlersMapSymbol].set(kind, cacheHandler); reference[handlersSetSymbol].add(cacheHandler); } //# sourceMappingURL=handlers.js.map ;// ./node_modules/next/dist/esm/server/revalidation-utils.js /** Run a callback, and execute any *new* revalidations added during its runtime. */ async function withExecuteRevalidates(store, callback) { if (!store) { return callback(); } // If we executed any revalidates during the request, then we don't want to execute them again. // save the state so we can check if anything changed after we're done running callbacks. const savedRevalidationState = cloneRevalidationState(store); try { return await callback(); } finally{ // Check if we have any new revalidates, and if so, wait until they are all resolved. const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); await executeRevalidates(store, newRevalidates); } } function cloneRevalidationState(store) { return { pendingRevalidatedTags: store.pendingRevalidatedTags ? [ ...store.pendingRevalidatedTags ] : [], pendingRevalidates: { ...store.pendingRevalidates }, pendingRevalidateWrites: store.pendingRevalidateWrites ? [ ...store.pendingRevalidateWrites ] : [] }; } function diffRevalidationState(prev, curr) { const prevTags = new Set(prev.pendingRevalidatedTags); const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); return { pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) }; } async function revalidateTags(tags, incrementalCache) { if (tags.length === 0) { return; } const promises = []; if (incrementalCache) { promises.push(incrementalCache.revalidateTag(tags)); } const handlers = getCacheHandlers(); if (handlers) { for (const handler of handlers){ promises.push(handler.expireTags(...tags)); } } await Promise.all(promises); } async function executeRevalidates(workStore, state) { const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; return Promise.all([ revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), ...Object.values(pendingRevalidates), ...pendingRevalidateWrites ]); } //# sourceMappingURL=revalidation-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/async-local-storage.js const async_local_storage_sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { value: "E504", enumerable: false, configurable: true }); class async_local_storage_FakeAsyncLocalStorage { disable() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } getStore() { // This fake implementation of AsyncLocalStorage always returns `undefined`. return undefined; } run() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } exit() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } enterWith() { throw async_local_storage_sharedAsyncLocalStorageNotAvailableError; } static bind(fn) { return fn; } } const async_local_storage_maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; function app_render_async_local_storage_createAsyncLocalStorage() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return new async_local_storage_maybeGlobalAsyncLocalStorage(); } return new async_local_storage_FakeAsyncLocalStorage(); } function async_local_storage_bindSnapshot(fn) { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.bind(fn); } return async_local_storage_FakeAsyncLocalStorage.bind(fn); } function async_local_storage_createSnapshot() { if (async_local_storage_maybeGlobalAsyncLocalStorage) { return async_local_storage_maybeGlobalAsyncLocalStorage.snapshot(); } return function(fn, ...args) { return fn(...args); }; } //# sourceMappingURL=async-local-storage.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js const afterTaskAsyncStorageInstance = app_render_async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=after-task-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=after-task-async-storage.external.js.map ;// ./node_modules/next/dist/esm/server/after/after-context.js class AfterContext { constructor({ waitUntil, onClose, onTaskError }){ this.workUnitStores = new Set(); this.waitUntil = waitUntil; this.onClose = onClose; this.onTaskError = onTaskError; this.callbackQueue = new (p_queue_default())(); this.callbackQueue.pause(); } after(task) { if (isThenable(task)) { if (!this.waitUntil) { errorWaitUntilNotAvailable(); } this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); } else if (typeof task === 'function') { // TODO(after): implement tracing this.addCallback(task); } else { throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { value: "E50", enumerable: false, configurable: true }); } } addCallback(callback) { // if something is wrong, throw synchronously, bubbling up to the `after` callsite. if (!this.waitUntil) { errorWaitUntilNotAvailable(); } const workUnitStore = workUnitAsyncStorageInstance.getStore(); if (workUnitStore) { this.workUnitStores.add(workUnitStore); } const afterTaskStore = afterTaskAsyncStorageInstance.getStore(); // This is used for checking if request APIs can be called inside `after`. // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), // not the current phase (which might be "after" if we're in a nested after). // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after ; // this should only happen once. if (!this.runCallbacksOnClosePromise) { this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); this.waitUntil(this.runCallbacksOnClosePromise); } // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). // We do this because we want all of these to be equivalent in every regard except timing: // after(() => x()) // after(x()) // await x() const wrappedCallback = async_local_storage_bindSnapshot(async ()=>{ try { await afterTaskAsyncStorageInstance.run({ rootTaskSpawnPhase }, ()=>callback()); } catch (error) { this.reportTaskError('function', error); } }); this.callbackQueue.add(wrappedCallback); } async runCallbacksOnClose() { await new Promise((resolve)=>this.onClose(resolve)); return this.runCallbacks(); } async runCallbacks() { if (this.callbackQueue.size === 0) return; for (const workUnitStore of this.workUnitStores){ workUnitStore.phase = 'after'; } const workStore = workAsyncStorageInstance.getStore(); if (!workStore) { throw Object.defineProperty(new lib_invariant_error_InvariantError('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { value: "E547", enumerable: false, configurable: true }); } return withExecuteRevalidates(workStore, ()=>{ this.callbackQueue.start(); return this.callbackQueue.onIdle(); }); } reportTaskError(taskKind, error) { // TODO(after): this is fine for now, but will need better intergration with our error reporting. // TODO(after): should we log this if we have a onTaskError callback? console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); if (this.onTaskError) { // this is very defensive, but we really don't want anything to blow up in an error handler try { this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); } catch (handlerError) { console.error(Object.defineProperty(new lib_invariant_error_InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', { cause: handlerError }), "__NEXT_ERROR_CODE", { value: "E569", enumerable: false, configurable: true })); } } } } function errorWaitUntilNotAvailable() { throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { value: "E91", enumerable: false, configurable: true }); } //# sourceMappingURL=after-context.js.map ;// ./node_modules/next/dist/esm/server/lib/lazy-result.js /** * Calls the given async function only when the returned promise-like object is * awaited. Afterwards, it provides the resolved value synchronously as `value` * property. */ function createLazyResult(fn) { let pendingResult; const result = { then (onfulfilled, onrejected) { if (!pendingResult) { pendingResult = fn(); } pendingResult.then((value)=>{ result.value = value; }).catch(()=>{ // The externally awaited result will be rejected via `onrejected`. We // don't need to handle it here. But we do want to avoid an unhandled // rejection. }); return pendingResult.then(onfulfilled, onrejected); } }; return result; } function isResolvedLazyResult(result) { return result.hasOwnProperty('value'); } //# sourceMappingURL=lazy-result.js.map ;// ./node_modules/next/dist/esm/server/async-storage/work-store.js function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { /** * Rules of Static & Dynamic HTML: * * 1.) We must generate static HTML unless the caller explicitly opts * in to dynamic HTML support. * * 2.) If dynamic HTML support is requested, we must honor that request * or throw an error. It is the sole responsibility of the caller to * ensure they aren't e.g. requesting dynamic HTML for an AMP page. * * 3.) If the request is in draft mode, we must generate dynamic HTML. * * 4.) If the request is a server action, we must generate dynamic HTML. * * These rules help ensure that other existing features like request caching, * coalescing, and ISR continue working as intended. */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; const isDevelopment = renderOpts.dev ?? false; const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is // when we are performing a static generation and we either are in debug // mode, or tracking fetch metrics was specifically opted into. isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); const store = { isStaticGeneration, page, route: normalizeAppPath(page), incrementalCache: // we fallback to a global incremental cache for edge-runtime locally // so that it can access the fs cache without mocks renderOpts.incrementalCache || globalThis.__incrementalCache, cacheLifeProfiles: renderOpts.cacheLifeProfiles, isRevalidate: renderOpts.isRevalidate, isBuildTimePrerendering: renderOpts.nextExport, hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, fetchCache: renderOpts.fetchCache, isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, isDraftMode: renderOpts.isDraftMode, isPrefetchRequest, buildId, reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', afterContext: createAfterContext(renderOpts), cacheComponentsEnabled: renderOpts.experimental.cacheComponents, dev: isDevelopment, previouslyRevalidatedTags, refreshTagsByCacheKind: createRefreshTagsByCacheKind(), runInCleanSnapshot: async_local_storage_createSnapshot(), shouldTrackFetchMetrics }; // TODO: remove this when we resolve accessing the store outside the execution context renderOpts.store = store; return store; } function createAfterContext(renderOpts) { const { waitUntil, onClose, onAfterTaskError } = renderOpts; return new AfterContext({ waitUntil, onClose, onTaskError: onAfterTaskError }); } /** * Creates a map with lazy results that refresh tags for the respective cache * kind when they're awaited for the first time. */ function createRefreshTagsByCacheKind() { const refreshTagsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('refreshTags' in cacheHandler) { refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags())); } } } return refreshTagsByCacheKind; } //# sourceMappingURL=work-store.js.map ;// ./node_modules/next/dist/esm/server/web/web-on-close.js /** Monitor when the consumer finishes reading the response body. that's as close as we can get to `res.on('close')` using web APIs. */ function trackBodyConsumed(body, onEnd) { if (typeof body === 'string') { const generator = async function* generate() { const encoder = new TextEncoder(); yield encoder.encode(body); onEnd(); }; // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice return generator(); } else { return trackStreamConsumed(body, onEnd); } } function trackStreamConsumed(stream, onEnd) { // NOTE: This function must handle `stream` being aborted or cancelled, // so it can't just be this: // // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) // // because that doesn't handle cancellations. // (and cancellation handling via `Transformer.cancel` is only available in node >20) const dest = new TransformStream(); const runOnEnd = ()=>onEnd(); stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); return dest.readable; } class CloseController { onClose(callback) { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { value: "E365", enumerable: false, configurable: true }); } this.target.addEventListener('close', callback); this.listeners++; } dispatchClose() { if (this.isClosed) { throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { value: "E229", enumerable: false, configurable: true }); } if (this.listeners > 0) { this.target.dispatchEvent(new Event('close')); } this.isClosed = true; } constructor(){ this.target = new EventTarget(); this.listeners = 0; this.isClosed = false; } } //# sourceMappingURL=web-on-close.js.map ;// ./node_modules/next/dist/esm/server/web/get-edge-preview-props.js /** * In edge runtime, these props directly accessed from environment variables. * - local: env vars will be injected through edge-runtime as runtime env vars * - deployment: env vars will be replaced by edge build pipeline */ function getEdgePreviewProps() { return { previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' }; } //# sourceMappingURL=get-edge-preview-props.js.map ;// ./node_modules/next/dist/esm/server/after/builtin-request-context.js function getBuiltinRequestContext() { const _globalThis = globalThis; const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; return ctx == null ? void 0 : ctx.get(); } const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); /** "@next/request-context" has a different signature from AsyncLocalStorage, * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context). * We don't need a full AsyncContext adapter here, just having `.get()` is enough */ function createLocalRequestContext() { const storage = createAsyncLocalStorage(); return { get: ()=>storage.getStore(), run: (value, callback)=>storage.run(value, callback) }; } //# sourceMappingURL=builtin-request-context.js.map ;// ./node_modules/next/dist/esm/server/lib/implicit-tags.js const getDerivedTags = (pathname)=>{ const derivedTags = [ `/layout` ]; // we automatically add the current path segments as tags // for revalidatePath handling if (pathname.startsWith('/')) { const pathnameParts = pathname.split('/'); for(let i = 1; i < pathnameParts.length + 1; i++){ let curPathname = pathnameParts.slice(0, i).join('/'); if (curPathname) { // all derived tags other than the page are layout tags if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; } derivedTags.push(curPathname); } } } return derivedTags; }; /** * Creates a map with lazy results that fetch the expiration value for the given * tags and respective cache kind when they're awaited for the first time. */ function createTagsExpirationsByCacheKind(tags) { const expirationsByCacheKind = new Map(); const cacheHandlers = getCacheHandlerEntries(); if (cacheHandlers) { for (const [kind, cacheHandler] of cacheHandlers){ if ('getExpiration' in cacheHandler) { expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags))); } } } return expirationsByCacheKind; } async function getImplicitTags(page, url, fallbackRouteParams) { const tags = []; const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; // Add the derived tags from the page. const derivedTags = getDerivedTags(page); for (let tag of derivedTags){ tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`; tags.push(tag); } // Add the tags from the pathname. If the route has unknown params, we don't // want to add the pathname as a tag, as it will be invalid. if (url.pathname && !hasFallbackRouteParams) { const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`; tags.push(tag); } return { tags, expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) }; } //# sourceMappingURL=implicit-tags.js.map ;// ./node_modules/next/dist/esm/server/lib/is-rsc-request.js /** * Normalizes the raw RSC header value. Only the literal string "1" is treated * as a valid RSC request marker; malformed or repeated values are ignored. */ function isRSCRequestHeader(value) { return value === '1'; } //# sourceMappingURL=is-rsc-request.js.map ;// ./node_modules/next/dist/esm/server/web/adapter.js class NextRequestHint extends NextRequest { constructor(params){ super(params.input, params.init); this.sourcePage = params.page; } get request() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } respondWith() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } waitUntil() { throw Object.defineProperty(new PageSignatureError({ page: this.sourcePage }), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const headersGetter = { keys: (headers)=>Array.from(headers.keys()), get: (headers, key)=>headers.get(key) ?? undefined }; let propagator = (request, fn)=>{ const tracer = tracer_getTracer(); return tracer.withPropagatedContext(request.headers, fn, headersGetter); }; let testApisIntercepted = false; function ensureTestApisIntercepted() { if (!testApisIntercepted) { testApisIntercepted = true; if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm __webpack_require__(720); interceptTestApis(); propagator = wrapRequestHandler(propagator); } } } async function adapter(params) { var _getBuiltinRequestContext; ensureTestApisIntercepted(); await ensureInstrumentationRegistered(); // TODO-APP: use explicit marker for this const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; params.request.url = normalizeRscURL(params.request.url); const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, { headers: params.request.headers, nextConfig: params.request.nextConfig }); // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. // Instead we use the keys before iteration. const keys = [ ...requestURL.searchParams.keys() ]; for (const key of keys){ const value = requestURL.searchParams.getAll(key); const normalizedKey = normalizeNextQueryParam(key); if (normalizedKey) { requestURL.searchParams.delete(normalizedKey); for (const val of value){ requestURL.searchParams.append(normalizedKey, val); } requestURL.searchParams.delete(key); } } // Ensure users only see page requests, never data requests. let buildId = process.env.__NEXT_BUILD_ID || ''; if ('buildId' in requestURL) { buildId = requestURL.buildId || ''; requestURL.buildId = ''; } const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers); const isNextDataRequest = requestHeaders.has('x-nextjs-data'); const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER)); if (isNextDataRequest && requestURL.pathname === '/index') { requestURL.pathname = '/'; } const flightHeaders = new Map(); // Headers should only be stripped for middleware if (!isEdgeRendering) { for (const header of FLIGHT_HEADERS){ const value = requestHeaders.get(header); if (value !== null) { flightHeaders.set(header, value); requestHeaders.delete(header); } } } const normalizeURL = false ? 0 : requestURL; const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY); const request = new NextRequestHint({ page: params.page, // Strip internal query parameters off the request. input: stripInternalSearchParams(normalizeURL).toString(), init: { body: params.request.body, headers: requestHeaders, method: params.request.method, nextConfig: params.request.nextConfig, signal: params.request.signal } }); /** * This allows to identify the request as a data request. The user doesn't * need to know about this property neither use it. We add it for testing * purposes. */ if (isNextDataRequest) { Object.defineProperty(request, '__isData', { enumerable: false, value: true }); } if (// If we are inside of the next start sandbox // leverage the shared instance if not we need // to create a fresh cache instance each time !globalThis.__incrementalCacheShared && params.IncrementalCache) { ; globalThis.__incrementalCache = new params.IncrementalCache({ CurCacheHandler: params.incrementalCacheHandler, minimalMode: "production" !== 'development', fetchCacheKeyPrefix: "", dev: "production" === 'development', requestHeaders: params.request.headers, getPrerenderManifest: ()=>{ return { version: -1, routes: {}, dynamicRoutes: {}, notFoundRoutes: [], preview: getEdgePreviewProps() }; } }); } // if we're in an edge runtime sandbox, we should use the waitUntil // that we receive from the enclosing NextServer const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); const event = new NextFetchEvent({ request, page: params.page, context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined }); let response; let cookiesFromResponse; response = await propagator(request, ()=>{ // we only care to make async storage available for middleware const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; if (isMiddleware) { // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), // so we have to inject it via DefinePlugin. // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). const waitUntil = event.waitUntil.bind(event); const closeController = new CloseController(); return tracer_getTracer().trace(MiddlewareSpan.execute, { spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, attributes: { 'http.target': request.nextUrl.pathname, 'http.method': request.method } }, async ()=>{ try { var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; const onUpdateCookies = (cookies)=>{ cookiesFromResponse = cookies; }; const previewProps = getEdgePreviewProps(); const page = '/' // Fake Work ; const fallbackRouteParams = null; const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams); const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); const workStore = createWorkStore({ page, renderOpts: { cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, experimental: { isRoutePPREnabled: false, cacheComponents: false, authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) }, supportsDynamicResponse: true, waitUntil, onClose: closeController.onClose.bind(closeController), onAfterTaskError: undefined }, isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1', buildId: buildId ?? '', previouslyRevalidatedTags: [] }); return await workAsyncStorageInstance.run(workStore, ()=>workUnitAsyncStorageInstance.run(requestStore, params.handler, request, event)); } finally{ // middleware cannot stream, so we can consider the response closed // as soon as the handler returns. // we can delay running it until a bit later -- // if it's needed, we'll have a `waitUntil` lock anyway. setTimeout(()=>{ closeController.dispatchClose(); }, 0); } }); } return params.handler(request, event); }); // check if response is a Response object if (response && !(response instanceof Response)) { throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { value: "E567", enumerable: false, configurable: true }); } if (response && cookiesFromResponse) { response.headers.set('set-cookie', cookiesFromResponse); } /** * For rewrites we must always include the locale in the final pathname * so we re-create the NextURL forcing it to include it when the it is * an internal rewrite. Also we make sure the outgoing rewrite URL is * a data URL if the request was a data request. */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { const destination = new NextURL(rewrite, { forceLocale: true, headers: params.request.headers, nextConfig: params.request.nextConfig }); if ( true && !isEdgeRendering) { if (destination.host === request.nextUrl.host) { destination.buildId = buildId || destination.buildId; response.headers.set('x-middleware-rewrite', String(destination)); } } /** * When the request is a data request we must show if there was a rewrite * with an internal header so the client knows which component to load * from the data request. */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString()); if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite // resolving config is enabled don't add this header // so the upstream app can set it instead !( false && 0)) { response.headers.set('x-nextjs-rewrite', relativeDestination); } // If this is an RSC request, and the pathname or search has changed, and // this isn't an external rewrite, we need to set the rewritten pathname and // query headers. if (isRSCRequest && isRelative) { if (requestURL.pathname !== destination.pathname) { response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname); } if (requestURL.search !== destination.search) { response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string destination.search.slice(1)); } } } /** * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, * unless it's already present. This is necessary to ensure that RSC hash validation * works correctly after a rewrite. For internal rewrites, the server can validate the * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. * However, for external rewrites (where the request is proxied to another Next.js server), * the external server does not have access to the original URL or its search parameters. * In these cases, forwarding the `_rsc` parameter is essential so that the external server * can perform the correct RSC hash validation. */ if (response && rewrite && isRSCRequest && rscHash) { const rewriteURL = new URL(rewrite); if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) { rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash); response.headers.set('x-middleware-rewrite', rewriteURL.toString()); } } /** * For redirects we will not include the locale in case when it is the * default and we must also make sure the outgoing URL is a data one if * the incoming request was a data request. */ const redirect = response == null ? void 0 : response.headers.get('Location'); if (response && redirect && !isEdgeRendering) { const redirectURL = new NextURL(redirect, { forceLocale: false, headers: params.request.headers, nextConfig: params.request.nextConfig }); /** * Responses created from redirects have immutable headers so we have * to clone the response to be able to modify it. */ response = new Response(response.body, response); if (true) { if (redirectURL.host === requestURL.host) { redirectURL.buildId = buildId || redirectURL.buildId; response.headers.set('Location', redirectURL.toString()); } } /** * When the request is a data request we can't use the location header as * it may end up with CORS error. Instead we map to an internal header so * the client knows the destination. */ if (isNextDataRequest) { response.headers.delete('Location'); response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString())); } } const finalResponse = response ? response : NextResponse.next(); // Flight headers are not overridable / removable so they are applied at the end. const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); const overwrittenHeaders = []; if (middlewareOverrideHeaders) { for (const [key, value] of flightHeaders){ finalResponse.headers.set(`x-middleware-request-${key}`, value); overwrittenHeaders.push(key); } if (overwrittenHeaders.length > 0) { finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); } } return { response: finalResponse, waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(), fetchMetrics: request.fetchMetrics }; } //# sourceMappingURL=adapter.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js var ua_parser = __webpack_require__(449); ;// ./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js function isBot(input) { return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); } function userAgentFromString(input) { return { ...parseua(input), isBot: input === undefined ? false : isBot(input) }; } function userAgent({ headers }) { return userAgentFromString(headers.get('user-agent') || undefined); } //# sourceMappingURL=user-agent.js.map ;// ./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js const GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js typeof URLPattern === 'undefined' ? undefined : URLPattern; //# sourceMappingURL=url-pattern.js.map ;// ./node_modules/next/dist/esm/server/after/after.js /** * This function allows you to schedule callbacks to be executed after the current request finishes. */ function after(task) { const workStore = workAsyncStorage.getStore(); if (!workStore) { // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { value: "E468", enumerable: false, configurable: true }); } const { afterContext } = workStore; return afterContext.after(task); } //# sourceMappingURL=after.js.map ;// ./node_modules/next/dist/esm/server/after/index.js //# sourceMappingURL=index.js.map // EXTERNAL MODULE: ./node_modules/next/dist/compiled/react/react.react-server.js var react_react_server = __webpack_require__(814); ;// ./node_modules/next/dist/esm/client/components/hooks-server-context.js const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class hooks_server_context_DynamicServerError extends Error { constructor(description){ super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map ;// ./node_modules/next/dist/esm/client/components/static-generation-bailout.js const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class static_generation_bailout_StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map ;// ./node_modules/next/dist/esm/server/dynamic-rendering-utils.js function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); /** * This function constructs a promise that will never resolve. This is primarily * useful for cacheComponents where we use promise resolution timing to determine which * parts of a render can be included in a prerender. * * @internal */ function dynamic_rendering_utils_makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying) { // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map ;// ./node_modules/next/dist/esm/lib/framework/boundary-constants.js const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map ;// ./node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js // This has to be a shared module which is shared between client component error boundary and dynamic component const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; /** An error that should be thrown when we want to bail out to client-side rendering. */ class bailout_to_csr_BailoutToCSRError extends Error { constructor(reason){ super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; } } /** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ function isBailoutToCSRError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === BAILOUT_TO_CSR; } //# sourceMappingURL=bailout-to-csr.js.map ;// ./node_modules/next/dist/esm/server/app-render/dynamic-rendering.js /** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly const hasPostpone = typeof react_react_server.unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } /** * This function communicates that the current scope should be treated as dynamic. * * In most cases this function is a no-op but if called during * a PPR prerender it will postpone the current sub-tree and calling * it during a normal prerender will cause the entire prerender to abort */ function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return dynamic_rendering_postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if (false) {} break; default: workUnitStore; } } } /** * This function is meant to be used when prerendering without cacheComponents or PPR. * When called during a build it will cause Next.js to consider the route as dynamic. * * @internal */ function dynamic_rendering_throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } /** * This function should be used to track whether something dynamic happened even when * we are in a dynamic render. This is useful for Dev where all renders are dynamic but * we still track whether dynamic APIs were accessed for helpful messaging * * @internal */ function dynamic_rendering_trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if (false) {} break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of prerender mode requestStore.prerenderPhase = false; } /** * use this function when prerendering with cacheComponents. If we are doing a * prospective prerender we don't actually abort because we want to discover * all caches for the shell. If this is the actual prerender we do abort. * * This function accepts a prerenderStore but the caller should ensure we're * actually running in cacheComponents mode. * * @internal */ function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } /** * Use this function when dynamically prerendering with dynamicIO. * We don't want to error, because it's better to return something * (and we've already aborted the render at the point where the sync dynamic error occured), * but we should log an error server-side. * @internal */ function warnOnSyncDynamicError(dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack) { // the server did something sync dynamic, likely // leading to an early termination of the prerender. console.error(dynamicTracking.syncDynamicErrorWithStack); } } // For now these implementations are the same so we just reexport const trackSynchronousRequestDataAccessInDev = (/* unused pure expression or super */ null && (trackSynchronousPlatformIOAccessInDev)); function Postpone({ reason, route }) { const prerenderStore = workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; dynamic_rendering_postponeWithTracking(route, reason, dynamicTracking); } function dynamic_rendering_postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } React.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } /** * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's * abort semantics slightly. */ function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } /** * In a prerender, we may end up with hanging Promises as inputs due them * stalling on connection() or because they're loading dynamic data. In that * case we need to abort the encoding of arguments since they'll never complete. */ function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = getRuntimeStagePromise(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>scheduleOnNextTick(()=>controller.abort())); } else { scheduleOnNextTick(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. React.use(makeHangingPromise(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return dynamic_rendering_postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${OUTLET_BOUNDARY_NAME}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = false ? 0 : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } if (serverDynamic.syncDynamicErrorWithStack) { // There is no shell and the server did something sync dynamic likely // leading to an early termination of the prerender before the shell // could be completed. We terminate the build/validating render. logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new StaticGenBailoutError(); } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new StaticGenBailoutError(); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map ;// ./node_modules/next/dist/esm/server/request/utils.js function throwWithStaticGenerationBailoutError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E576", enumerable: false, configurable: true }); } function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E779", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } function utils_isRequestAPICallableInsideAfter() { const afterTaskStore = afterTaskAsyncStorage.getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map ;// ./node_modules/next/dist/esm/server/request/connection.js /** * This function allows you to indicate that you require an actual user Request before continuing. * * During prerendering it will never resolve and during rendering it resolves immediately. */ function connection() { const callingExpression = 'connection'; const workStore = workAsyncStorage.getStore(); const workUnitStore = workUnitAsyncStorage.getStore(); if (workStore) { if (workUnitStore && workUnitStore.phase === 'after' && !isRequestAPICallableInsideAfter()) { throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { value: "E186", enumerable: false, configurable: true }); } if (workStore.forceStatic) { // When using forceStatic, we override all other logic and always just // return a resolving promise without tracking. return Promise.resolve(undefined); } if (workStore.dynamicShouldError) { throw Object.defineProperty(new StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E562", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'cache': { const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E752", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'private-cache': { // It might not be intuitive to throw for private caches as well, but // we don't consider runtime prefetches as "actual requests" (in the // navigation sense), despite allowing them to read cookies. const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E753", enumerable: false, configurable: true }); Error.captureStackTrace(error, connection); workStore.invalidDynamicUsageError ??= error; throw error; } case 'unstable-cache': throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { value: "E1", enumerable: false, configurable: true }); case 'prerender': case 'prerender-client': case 'prerender-runtime': // We return a promise that never resolves to allow the prerender to // stall at this point. return makeHangingPromise(workUnitStore.renderSignal, workStore.route, '`connection()`'); case 'prerender-ppr': // We use React's postpone API to interrupt rendering here to create a // dynamic hole return postponeWithTracking(workStore.route, 'connection', workUnitStore.dynamicTracking); case 'prerender-legacy': // We throw an error here to interrupt prerendering to mark the route // as dynamic return throwToInterruptStaticGeneration('connection', workStore, workUnitStore); case 'request': trackDynamicDataInDynamicRender(workUnitStore); if (false) {} else { return Promise.resolve(undefined); } default: workUnitStore; } } } // If we end up here, there was no work store or work unit store present. throwForMissingRequestStore(callingExpression); } //# sourceMappingURL=connection.js.map ;// ./node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js // This regex will have fast negatives meaning valid identifiers may not pass // this test. However this is only used during static generation to provide hints // about why a page bailed out of some or all prerendering and we can use bracket notation // for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']` // even if this would have been fine too `searchParams.ಠ_ಠ` const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; function reflect_utils_describeStringPropertyAccess(target, prop) { if (isDefinitelyAValidIdentifier.test(prop)) { return "`" + target + "." + prop + "`"; } return "`" + target + "[" + JSON.stringify(prop) + "]`"; } function describeHasCheckingStringProperty(target, prop) { const stringifiedProp = JSON.stringify(prop); return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; } const reflect_utils_wellKnownProperties = new Set([ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', 'toLocaleString', // Promise prototype // fallthrough 'then', 'catch', 'finally', // React Promise extension // fallthrough 'status', // React introspection 'displayName', '_debugInfo', // Common tested properties // fallthrough 'toJSON', '$$typeof', '__esModule' ]); //# sourceMappingURL=reflect-utils.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js const actionAsyncStorageInstance = async_local_storage_createAsyncLocalStorage(); //# sourceMappingURL=action-async-storage-instance.js.map ;// ./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js // Share the instance module in the next-shared layer //# sourceMappingURL=action-async-storage.external.js.map ;// ./node_modules/next/dist/esm/lib/picocolors.js // 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'); 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; }; }; const picocolors_reset = (/* unused pure expression or super */ null && (enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String)); const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m'); const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m'); const italic = formatter('\x1b[3m', '\x1b[23m'); const underline = formatter('\x1b[4m', '\x1b[24m'); const inverse = formatter('\x1b[7m', '\x1b[27m'); const picocolors_hidden = formatter('\x1b[8m', '\x1b[28m'); const strikethrough = formatter('\x1b[9m', '\x1b[29m'); const black = formatter('\x1b[30m', '\x1b[39m'); const red = formatter('\x1b[31m', '\x1b[39m'); const green = formatter('\x1b[32m', '\x1b[39m'); const yellow = formatter('\x1b[33m', '\x1b[39m'); const blue = formatter('\x1b[34m', '\x1b[39m'); const magenta = formatter('\x1b[35m', '\x1b[39m'); const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m'); const cyan = formatter('\x1b[36m', '\x1b[39m'); const white = formatter('\x1b[37m', '\x1b[39m'); const gray = formatter('\x1b[90m', '\x1b[39m'); const bgBlack = formatter('\x1b[40m', '\x1b[49m'); const bgRed = formatter('\x1b[41m', '\x1b[49m'); const bgGreen = formatter('\x1b[42m', '\x1b[49m'); const bgYellow = formatter('\x1b[43m', '\x1b[49m'); const bgBlue = formatter('\x1b[44m', '\x1b[49m'); const bgMagenta = formatter('\x1b[45m', '\x1b[49m'); const bgCyan = formatter('\x1b[46m', '\x1b[49m'); const bgWhite = formatter('\x1b[47m', '\x1b[49m'); //# sourceMappingURL=picocolors.js.map ;// ./node_modules/next/dist/esm/build/output/log.js const prefixes = { wait: white(bold('○')), error: red(bold('⨯')), warn: yellow(bold('⚠')), ready: '▲', info: white(bold(' ')), event: green(bold('✓')), trace: magenta(bold('»')) }; const LOGGING_METHOD = { log: 'log', warn: 'warn', error: 'error' }; function prefixedLog(prefixType, ...message) { if ((message[0] === '' || message[0] === undefined) && message.length === 1) { message.shift(); } const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; const prefix = prefixes[prefixType]; // If there's no message, don't print the prefix but a new line if (message.length === 0) { console[consoleMethod](''); } else { // Ensure if there's ANSI escape codes it's concatenated into one string. // Chrome DevTool can only handle color if it's in one string. if (message.length === 1 && typeof message[0] === 'string') { console[consoleMethod](' ' + prefix + ' ' + message[0]); } else { console[consoleMethod](' ' + prefix, ...message); } } } function bootstrap(...message) { // logging format: ' ' // e.g. ' ✓ Compiled successfully' // Add spaces to align with the indent of other logs console.log(' ' + message.join(' ')); } function wait(...message) { prefixedLog('wait', ...message); } function error(...message) { prefixedLog('error', ...message); } function warn(...message) { prefixedLog('warn', ...message); } function ready(...message) { prefixedLog('ready', ...message); } function info(...message) { prefixedLog('info', ...message); } function log_event(...message) { prefixedLog('event', ...message); } function log_trace(...message) { prefixedLog('trace', ...message); } const warnOnceCache = new LRUCache(10000, (value)=>value.length); function log_warnOnce(...message) { const key = message.join(' '); if (!warnOnceCache.has(key)) { warnOnceCache.set(key, key); warn(...message); } } //# sourceMappingURL=log.js.map ;// ./node_modules/next/dist/esm/server/request/root-params.js const CachedParams = new WeakMap(); /** * @deprecated import specific root params from `next/root-params` instead. */ async function unstable_rootParams() { warnOnce('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { value: "E615", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { value: "E641", enumerable: false, configurable: true }); } switch(workUnitStore.type){ case 'cache': case 'unstable-cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E642", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); case 'private-cache': case 'prerender-runtime': case 'request': return Promise.resolve(workUnitStore.rootParams); default: return workUnitStore; } } function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender-client': { const exportName = '`unstable_rootParams`'; throw Object.defineProperty(new InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); CachedParams.set(underlyingParams, promise); return promise; } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // We have fallback params at this level so we need to make an erroring // params object which will postpone if you access the fallback params return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } // We don't have any fallback params so we have an entirely static safe params object return Promise.resolve(underlyingParams); } function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (wellKnownProperties.has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = describeStringPropertyAccess('unstable_rootParams', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } }, enumerable: true }); } else { ; promise[prop] = underlyingParams[prop]; } } }); return promise; } /** * Used for the compiler-generated `next/root-params` module. * @internal */ function getRootParam(paramName) { const apiName = `\`import('next/root-params').${paramName}()\``; const workStore = workAsyncStorage.getStore(); if (!workStore) { throw Object.defineProperty(new InvariantError(`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { value: "E764", enumerable: false, configurable: true }); } const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { value: "E774", enumerable: false, configurable: true }); } const actionStore = actionAsyncStorage.getStore(); if (actionStore) { if (actionStore.isAppRoute) { // TODO(root-params): add support for route handlers throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E765", enumerable: false, configurable: true }); } if (actionStore.isAction && workUnitStore.phase === 'action') { // Actions are not fundamentally tied to a route (even if they're always submitted from some page), // so root params would be inconsistent if an action is called from multiple roots. // Make sure we check if the phase is "action" - we should not error in the rerender // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { value: "E766", enumerable: false, configurable: true }); } } switch(workUnitStore.type){ case 'unstable-cache': case 'cache': { throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { value: "E760", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': { return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); } case 'private-cache': case 'prerender-runtime': case 'request': { break; } default: { workUnitStore; } } return Promise.resolve(workUnitStore.rootParams[paramName]); } function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { switch(prerenderStore.type){ case 'prerender-client': { throw Object.defineProperty(new InvariantError(`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E693", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-legacy': case 'prerender-ppr': default: } const underlyingParams = prerenderStore.rootParams; switch(prerenderStore.type){ case 'prerender': { // We are in a dynamicIO prerender. // The param is a fallback, so it should be treated as dynamic. if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeHangingPromise(prerenderStore.renderSignal, workStore.route, apiName); } break; } case 'prerender-ppr': { // We aren't in a dynamicIO prerender, but the param is a fallback, // so we need to make an erroring params object which will postpone/error if you access it if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); } break; } case 'prerender-legacy': { break; } default: { prerenderStore; } } // If the param is not a fallback param, we just return the statically available value. return Promise.resolve(underlyingParams[paramName]); } /** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { const expression = describeStringPropertyAccess(apiName, paramName); // In most dynamic APIs, we also throw if `dynamic = "error"`. // However, root params are only dynamic when we're generating a fallback shell, // and even with `dynamic = "error"` we still support generating dynamic fallback shells. // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` switch(prerenderStore.type){ case 'prerender-ppr': { return postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking); } case 'prerender-legacy': { return throwToInterruptStaticGeneration(expression, workStore, prerenderStore); } default: { prerenderStore; } } } //# sourceMappingURL=root-params.js.map ;// ./node_modules/next/dist/esm/server/web/exports/index.js // Alias index file of next/server for edge runtime for tree-shaking purpose //# sourceMappingURL=index.js.map ;// ./node_modules/next/dist/esm/api/server.js //# sourceMappingURL=server.js.map ;// ./src/middleware.js const WINDOW_MS = 60000; const MAX_PER_WINDOW = 100; const hits = new Map(); function getClientIp(request) { return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip") || "127.0.0.1"; } function checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) { const now = Date.now(); if (!hits.has(key)) hits.set(key, []); const timestamps = hits.get(key).filter((t)=>now - t < windowMs); timestamps.push(now); hits.set(key, timestamps); return { allowed: timestamps.length <= max, remaining: Math.max(0, max - timestamps.length), reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000) }; } function middleware(request) { const { pathname } = request.nextUrl; if (!pathname.startsWith("/api/")) return NextResponse.next(); const ip = getClientIp(request); const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false'; if (!useRedis) { const result = checkRateLimitLocal(`rl:${ip}`); if (!result.allowed) { return new NextResponse(JSON.stringify({ error: "Too many requests. Try again shortly." }), { status: 429, headers: { "Content-Type": "application/json", "X-RateLimit-Limit": String(MAX_PER_WINDOW), "X-RateLimit-Remaining": "0", "X-RateLimit-Reset": String(result.reset), "Cache-Control": "no-store" } }); } const response = NextResponse.next(); response.headers.set("X-RateLimit-Limit", String(MAX_PER_WINDOW)); response.headers.set("X-RateLimit-Remaining", String(result.remaining)); response.headers.set("X-RateLimit-Reset", String(result.reset)); return response; } return NextResponse.next(); } const config = { matcher: "/api/:path*" }; ;// ./node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; /** * Checks an error to determine if it's an error generated by * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`. * * @param error the error that may reference a HTTP access error * @returns true if the error is a HTTP access error */ function http_access_fallback_isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-status-code.js var redirect_status_code_RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map ;// ./node_modules/next/dist/esm/client/components/redirect-error.js const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); /** * Checks an error to determine if it's an error generated by the * `redirect(url)` helper. * * @param error the error that may reference a redirect error * @returns true if the error is a redirect error */ function redirect_error_isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode; } //# sourceMappingURL=redirect-error.js.map ;// ./node_modules/next/dist/esm/client/components/is-next-router-error.js /** * Returns true if the error is a navigation signal error. These errors are * thrown by user code to perform navigation operations and interrupt the React * render. */ function isNextRouterError(error) { return isRedirectError(error) || isHTTPAccessFallbackError(error); } //# sourceMappingURL=is-next-router-error.js.map ;// ./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19! // Import the userland code. const mod = { ...middleware_namespaceObject }; const handler = mod.middleware || mod.default; const page = "/src/middleware"; if (typeof handler !== 'function') { throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { value: "E120", enumerable: false, configurable: true }); } // Middleware will only sent out the FetchEvent to next server, // so load instrumentation module here and track the error inside middleware module. function errorHandledHandler(fn) { return async (...args)=>{ try { return await fn(...args); } catch (err) { // In development, error the navigation API usage in runtime, // since it's not allowed to be used in middleware as it's outside of react component tree. if (false) {} const req = args[0]; const url = new URL(req.url); const resource = url.pathname + url.search; await edgeInstrumentationOnRequestError(err, { path: resource, method: req.method, headers: Object.fromEntries(req.headers.entries()) }, { routerKind: 'Pages Router', routePath: '/middleware', routeType: 'middleware', revalidateReason: undefined }); throw err; } }; } function nHandler(opts) { return adapter({ ...opts, page, handler: errorHandledHandler(handler) }); } //# sourceMappingURL=middleware.js.map /***/ }), /***/ 213: /***/ ((module) => { var __dirname = "/"; (()=>{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue})();module.exports=n})(); /***/ }), /***/ 356: /***/ ((module) => { "use strict"; module.exports = require("node:buffer"); /***/ }), /***/ 392: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getTestReqInfo: function() { return getTestReqInfo; }, withRequest: function() { return withRequest; } }); const _nodeasync_hooks = __webpack_require__(521); const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); function extractTestInfoFromRequest(req, reader) { const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); if (!proxyPortHeader) { return undefined; } const url = reader.url(req); const proxyPort = Number(proxyPortHeader); const testData = reader.header(req, 'next-test-data') || ''; return { url, proxyPort, testData }; } function withRequest(req, reader, fn) { const testReqInfo = extractTestInfoFromRequest(req, reader); if (!testReqInfo) { return fn(); } return testStorage.run(testReqInfo, fn); } function getTestReqInfo(req, reader) { const testReqInfo = testStorage.getStore(); if (testReqInfo) { return testReqInfo; } if (req && reader) { return extractTestInfoFromRequest(req, reader); } return undefined; } //# sourceMappingURL=context.js.map /***/ }), /***/ 440: /***/ ((__unused_webpack_module, exports) => { "use strict"; var __webpack_unused_export__; /** * @license React * react.react-server.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactSharedInternals = { H: null, A: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { url += "?args[]=" + encodeURIComponent(arguments[1]); for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]); } return ( "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var isArrayImpl = Array.isArray; function noop() {} var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; maybeIterable = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } var hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: void 0 !== refProp ? refProp : null, props: props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return ( "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE ); } function escape(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return ( "$" + key.replace(/[=:]/g, function (match) { return escaperLookup[match]; }) ); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch ( ("string" === typeof thenable.status ? thenable.then(noop, noop) : ((thenable.status = "pending"), thenable.then( function (fulfilledValue) { "pending" === thenable.status && ((thenable.status = "fulfilled"), (thenable.value = fulfilledValue)); }, function (error) { "pending" === thenable.status && ((thenable.status = "rejected"), (thenable.reason = error)); } )), thenable.status) ) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if ("undefined" === type || "boolean" === type) children = null; var invokeCallback = !1; if (null === children) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return ( (invokeCallback = children._init), mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ) ); } } if (invokeCallback) return ( (callback = callback(children)), (invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar), isArrayImpl(callback) ? ((escapedPrefix = ""), null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) { return c; })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (null == callback.key || (children && children.key === callback.key) ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1 ); invokeCallback = 0; var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) (nameSoFar = children[i]), (type = nextNamePrefix + getElementKey(nameSoFar, i)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if (((i = getIteratorFn(children)), "function" === typeof i)) for ( children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) (nameSoFar = nameSoFar.value), (type = nextNamePrefix + getElementKey(nameSoFar, i++)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if ("object" === type) { if ("function" === typeof children.then) return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); array = String(children); throw Error( formatProdErrorMessage( 31, "[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array ) ); } return invokeCallback; } function mapChildren(children, func, context) { if (null == children) return children; var result = [], count = 0; mapIntoArray(children, result, "", "", function (child) { return func.call(context, child, count++); }); return result; } function lazyInitializer(payload) { if (-1 === payload._status) { var ctor = payload._result; ctor = ctor(); ctor.then( function (moduleObject) { if (0 === payload._status || -1 === payload._status) (payload._status = 1), (payload._result = moduleObject); }, function (error) { if (0 === payload._status || -1 === payload._status) (payload._status = 2), (payload._result = error); } ); -1 === payload._status && ((payload._status = 0), (payload._result = ctor)); } if (1 === payload._status) return payload._result.default; throw payload._result; } function createCacheRoot() { return new WeakMap(); } function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } __webpack_unused_export__ = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { mapChildren( children, function () { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function (children) { var n = 0; mapChildren(children, function () { n++; }); return n; }, toArray: function (children) { return ( mapChildren(children, function (child) { return child; }) || [] ); }, only: function (children) { if (!isValidElement(children)) throw Error(formatProdErrorMessage(143)); return children; } }; __webpack_unused_export__ = REACT_FRAGMENT_TYPE; __webpack_unused_export__ = REACT_PROFILER_TYPE; __webpack_unused_export__ = REACT_STRICT_MODE_TYPE; __webpack_unused_export__ = REACT_SUSPENSE_TYPE; __webpack_unused_export__ = ReactSharedInternals; __webpack_unused_export__ = function (fn) { return function () { var dispatcher = ReactSharedInternals.A; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); void 0 === dispatcher && ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher)); fnMap = 0; for (var l = arguments.length; fnMap < l; fnMap++) { var arg = arguments[fnMap]; if ( "function" === typeof arg || ("object" === typeof arg && null !== arg) ) { var objectCache = dispatcher.o; null === objectCache && (dispatcher.o = objectCache = new WeakMap()); dispatcher = objectCache.get(arg); void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } else (objectCache = dispatcher.p), null === objectCache && (dispatcher.p = objectCache = new Map()), (dispatcher = objectCache.get(arg)), void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } if (1 === dispatcher.s) return dispatcher.v; if (2 === dispatcher.s) throw dispatcher.v; try { var result = fn.apply(null, arguments); fnMap = dispatcher; fnMap.s = 1; return (fnMap.v = result); } catch (error) { throw ((result = dispatcher), (result.s = 2), (result.v = error), error); } }; }; __webpack_unused_export__ = function () { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.cacheSignal() : null; }; __webpack_unused_export__ = function () { return null; }; __webpack_unused_export__ = function (element, config, children) { if (null === element || void 0 === element) throw Error(formatProdErrorMessage(267, element)); var props = assign({}, element.props), key = element.key; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || ("ref" === propName && void 0 === config.ref) || (props[propName] = config[propName]); var propName = arguments.length - 2; if (1 === propName) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; __webpack_unused_export__ = function (type, config, children) { var propName, props = {}, key = null; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (1 === childrenLength) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in ((childrenLength = type.defaultProps), childrenLength)) void 0 === props[propName] && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; __webpack_unused_export__ = function () { return { current: null }; }; __webpack_unused_export__ = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; }; __webpack_unused_export__ = isValidElement; __webpack_unused_export__ = function (ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; __webpack_unused_export__ = function (type, compare) { return { $$typeof: REACT_MEMO_TYPE, type: type, compare: void 0 === compare ? null : compare }; }; __webpack_unused_export__ = function (usable) { return ReactSharedInternals.H.use(usable); }; __webpack_unused_export__ = function (callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; __webpack_unused_export__ = function () {}; __webpack_unused_export__ = function () { return ReactSharedInternals.H.useId(); }; __webpack_unused_export__ = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; __webpack_unused_export__ = "19.2.0-canary-0bdb9206-20250818"; /***/ }), /***/ 443: /***/ ((module) => { "use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { RequestCookies: () => RequestCookies, ResponseCookies: () => ResponseCookies, parseCookie: () => parseCookie, parseSetCookie: () => parseSetCookie, stringifyCookie: () => stringifyCookie }); module.exports = __toCommonJS(src_exports); // src/serialize.ts function stringifyCookie(c) { var _a; const attrs = [ "path" in c && c.path && `Path=${c.path}`, "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, "domain" in c && c.domain && `Domain=${c.domain}`, "secure" in c && c.secure && "Secure", "httpOnly" in c && c.httpOnly && "HttpOnly", "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, "partitioned" in c && c.partitioned && "Partitioned", "priority" in c && c.priority && `Priority=${c.priority}` ].filter(Boolean); const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; } function parseCookie(cookie) { const map = /* @__PURE__ */ new Map(); for (const pair of cookie.split(/; */)) { if (!pair) continue; const splitAt = pair.indexOf("="); if (splitAt === -1) { map.set(pair, "true"); continue; } const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; try { map.set(key, decodeURIComponent(value != null ? value : "true")); } catch { } } return map; } function parseSetCookie(setCookie) { if (!setCookie) { return void 0; } const [[name, value], ...attributes] = parseCookie(setCookie); const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries( attributes.map(([key, value2]) => [ key.toLowerCase().replace(/-/g, ""), value2 ]) ); const cookie = { name, value: decodeURIComponent(value), domain, ...expires && { expires: new Date(expires) }, ...httponly && { httpOnly: true }, ...typeof maxage === "string" && { maxAge: Number(maxage) }, path, ...samesite && { sameSite: parseSameSite(samesite) }, ...secure && { secure: true }, ...priority && { priority: parsePriority(priority) }, ...partitioned && { partitioned: true } }; return compact(cookie); } function compact(t) { const newT = {}; for (const key in t) { if (t[key]) { newT[key] = t[key]; } } return newT; } var SAME_SITE = ["strict", "lax", "none"]; function parseSameSite(string) { string = string.toLowerCase(); return SAME_SITE.includes(string) ? string : void 0; } var PRIORITY = ["low", "medium", "high"]; function parsePriority(string) { string = string.toLowerCase(); return PRIORITY.includes(string) ? string : void 0; } function splitCookiesString(cookiesString) { if (!cookiesString) return []; var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { cookiesSeparatorFound = true; pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // src/request-cookies.ts var RequestCookies = class { constructor(requestHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); this._headers = requestHeaders; const header = requestHeaders.get("cookie"); if (header) { const parsed = parseCookie(header); for (const [name, value] of parsed) { this._parsed.set(name, { name, value }); } } } [Symbol.iterator]() { return this._parsed[Symbol.iterator](); } /** * The amount of cookies received from the client */ get size() { return this._parsed.size; } get(...args) { const name = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(name); } getAll(...args) { var _a; const all = Array.from(this._parsed); if (!args.length) { return all.map(([_, value]) => value); } const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter(([n]) => n === name).map(([_, value]) => value); } has(name) { return this._parsed.has(name); } set(...args) { const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; const map = this._parsed; map.set(name, { name, value }); this._headers.set( "cookie", Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ") ); return this; } /** * Delete the cookies matching the passed name or names in the request. */ delete(names) { const map = this._parsed; const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); this._headers.set( "cookie", Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ") ); return result; } /** * Delete all the cookies in the cookies in the request. */ clear() { this.delete(Array.from(this._parsed.keys())); return this; } /** * Format the cookies in the request as a string for logging */ [Symbol.for("edge-runtime.inspect.custom")]() { return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); } }; // src/response-cookies.ts var ResponseCookies = class { constructor(responseHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); var _a, _b, _c; this._headers = responseHeaders; const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString); if (parsed) this._parsed.set(parsed.name, parsed); } } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. */ get(...args) { const key = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(key); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. */ getAll(...args) { var _a; const all = Array.from(this._parsed.values()); if (!args.length) { return all; } const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter((c) => c.name === key); } has(name) { return this._parsed.has(name); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. */ set(...args) { const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; const map = this._parsed; map.set(name, normalizeCookie({ name, value, ...cookie })); replace(map, this._headers); return this; } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. */ delete(...args) { const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]]; return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) }); } [Symbol.for("edge-runtime.inspect.custom")]() { return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map(stringifyCookie).join("; "); } }; function replace(bag, headers) { headers.delete("set-cookie"); for (const [, value] of bag) { const serialized = stringifyCookie(value); headers.append("set-cookie", serialized); } } function normalizeCookie(cookie = { name: "", value: "" }) { if (typeof cookie.expires === "number") { cookie.expires = new Date(cookie.expires); } if (cookie.maxAge) { cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); } if (cookie.path === null || cookie.path === void 0) { cookie.path = "/"; } return cookie; } // Annotate the CommonJS export names for ESM import in node: 0 && (0); /***/ }), /***/ 449: /***/ ((module, exports, __webpack_require__) => { var __dirname = "/"; var __WEBPACK_AMD_DEFINE_RESULT__;(()=>{var i={226:function(i,e){(function(o,a){"use strict";var r="1.0.35",t="",n="?",s="function",b="undefined",w="object",l="string",d="major",c="model",u="name",p="type",m="vendor",f="version",h="architecture",v="console",g="mobile",k="tablet",x="smarttv",_="wearable",y="embedded",q=350;var T="Amazon",S="Apple",z="ASUS",N="BlackBerry",A="Browser",C="Chrome",E="Edge",O="Firefox",U="Google",j="Huawei",P="LG",R="Microsoft",M="Motorola",B="Opera",V="Samsung",D="Sharp",I="Sony",W="Viera",F="Xiaomi",G="Zebra",H="Facebook",L="Chromium OS",Z="Mac OS";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]="iPad";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!="Unknown"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if("object"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if("function"===s&&__webpack_require__.amdO){!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return UAParser}).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window==="object"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(226);module.exports=o})(); /***/ }), /***/ 521: /***/ ((module) => { "use strict"; module.exports = require("node:async_hooks"); /***/ }), /***/ 663: /***/ ((module) => { var __dirname = "/"; (()=>{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); 0 && (0); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { interceptTestApis: function() { return interceptTestApis; }, wrapRequestHandler: function() { return wrapRequestHandler; } }); const _context = __webpack_require__(392); const _fetch = __webpack_require__(165); function interceptTestApis() { return (0, _fetch.interceptFetch)(__webpack_require__.g.fetch); } function wrapRequestHandler(handler) { return (req, fn)=>(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); } //# sourceMappingURL=server-edge.js.map /***/ }), /***/ 814: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { module.exports = __webpack_require__(440); } else {} /***/ }), /***/ 817: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var __dirname = "/"; (()=>{"use strict";var e={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:__webpack_require__.g},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.6.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})(); /***/ }) }, /******/ __webpack_require__ => { // webpackRuntimeModules /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) /******/ var __webpack_exports__ = (__webpack_exec__(208)); /******/ (_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)["middleware_src/middleware"] = __webpack_exports__; /******/ } ]); {}xL-;;;;;;;AAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAIL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,GAAW;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sGAAsG;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC,+BAA+B,MAAM;AACrC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA,yDAAyD,UAAU;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uEAAuE,YAAY;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,4EAA4E,gBAAgB,EAAE,YAAY;AAC1G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAM;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAM;AACd;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;AC7IO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEA;;ACrGO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC3BO;AACA,6CAA6C;AAC7C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACO;AACA;AACA;AACA;AACP;AACO;AACP;AACA;AACA;AACO;AACP;AACO;AACA,mCAAmC,4DAAY,oBAAoB,CAAC;AAC3E;AACO;AACP;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+NAA+K;AACtN,uCAAuC,qJAAqG;AAC5I,6CAA6C,yIAAyF;AACtI,kCAAkC,wKAAwH;AAC1J,mDAAmD,yJAAyG;AAC5J,kCAAkC,yKAAyH;AAC3J;AACA;AACA,yCAAyC,yJAAyG;AAClJ,oCAAoC,0MAA0J;AAC9L,8BAA8B,mQAAmN;AACjP,kCAAkC,0MAA0J;AAC5L,4BAA4B;AACnC;AACA;AACA;AACA;AACA;AACA,CAAC;AACM;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD;;ACvK+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,yDAAyD;AACzD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN,mEAAmE,YAAY;AAC/E;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA,QAAQ,uBAAuB;AAC/B,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AChJ8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gHAAgH;AAChH;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;ACzEO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAAA,KAAM,gBAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,QACjDC,gBAAAA,KAAKK,OAAAA,KAAO,gBAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF;;;ACxBA;;;;;;CAMC,GACM,SAASQ,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;A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BAAyB,WAAW;AACpC,+IAA+I,kBAAkB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;ACxL4G;;AAE5G;;ACFsC;AAC4B;AACN;AACjB;AACpC;AACP;AACA;AACA;AACA;AACA,IAAW;AACX,gCAAgC;AAChC;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA;AACA,YAAY,KAAmC,EAAE,EAIxC;AACT;AACA;AACA,4BAA4B,OAAO;AACnC,qBAAqB,yBAAyB;AAC9C;AACA,SAAS;AACT;AACA,yBAAyB,oCAAc;AACvC;AACA,iBAAiB,MAA8C,GAAG,CAAG;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;;AAEA;;AChFO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACnBmE;AAC7B;AAC4B;AACd;AACR;AAC5C,MAAM,kBAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX,+BAA+B;AAC/B;AACA;AACA,4BAA4B,qCAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,qCAAe;AACrE,yGAAyG,yCAAe;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT,aAAa,kBAAS;AACtB;AACA,gCAAgC,OAAO;AACvC,yBAAyB,yBAAyB;AAClD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,4CAA4C,WAAW;AACvD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;ACjIA;;CAEC,GAaM,SAASoC,iBACdC,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ChB,eACA;AAGJ;;;AC/D2C;AAC3C;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC3KA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2CAAuB;AACvC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AChDgE;AACzD,iCAAiC,2CAAuB;;AAE/D;;ACHA;AAGE;AACsD;;AAExD;;ACN4C;AACC;AACF;AACwC;AACnF;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,qCAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qCAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,+CAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA,CAAC,iBAAiB;AAClB,IAAI,kBAAQ;AACZ;AACA;AACA,CAAC,CAAC,kBAAQ,MAAM;AAChB;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACsN;;AAEtN;;ACvIA;;;;;CAKC,GACM,SAASoG,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B;;;ACfyE;AACZ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAmC;AACvC,UAAU,mBAAO,CAAC,GAAoB;AACtC,EAAE,KAAK,EAMN;AACD,QAAQ,sEAAsE;AACvE;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B,QAAQ,oFAAoF;AACxK;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAS;AACf;AACA;AACA,CAAC;AAC8C;;AAE/C;;ACvOwE;AACsC;AAC9D;AACE;AAC3C;AACP;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP,oBAAoB,cAAc;AAClC,sCAAsC,2BAA2B;AACjE;AACA,gDAAgD,0CAA0C;AAC1F;AACA;AACA;AACA;AACA;AACO;AACA;AACA,+BAA+B,+DAAe;AAC9C;AACA;AACA,2CAA2C;AAClD;AACA;AACA;AACA,YAAY,YAAY,EAAE,mBAAO,CAAC,GAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW,uBAAuB,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEA;;AC3JuF;AAChF;AACP;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E,wDAAwD,4BAA4B;AACpF;AACA,QAAQ,MAAqC,IAAI,CAA+C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;ACnD4E;AACJ;AACmH;AAC3G;AACtB;AACR;AAClD;AACA,oBAAoB,cAAc;AAClC,yBAAyB,cAAc;AACvC;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA,wBAAwB,oCAAc,CAAC,cAAc;AACrD,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,oCAAc,CAAC,cAAc;AACxE;AACA;AACA;AACA,gCAAgC,qCAAqB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gDAAgD,mCAAmC;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,iBAAiB;AACvD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;;ACrHgE;AACzD,qCAAqC,2CAAuB;;AAEnE;;AhBHO,MAAMlC,6BAAUA,GAAG,MAAc;AACjC,MAAMC,gCAAaA,GAAG,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uDAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;AD1LO,MAAMJ,kCAAcA,SAASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;AERA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACnMA,+EAA+E;AAC/E,qBAAqB;AACd,MAAMC,eAAe,IAAIC,MAAqB;AAE9C,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAarE,GAAG,CAAC0E;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC;;;;AChBD;;;;;;;CAOC,GAEsC;AAKa;AAsBpD,qDAAqD;AACrD,MAAMI,cAAc,IAAID,QAAQA,CAC9B,KAAK,OAAO,MACZ,CAACE,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIV;AAExB,MAAMW,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BlH;AAEJ,MAAMoH,oCAAmBA,GAAmB;IAC1C,MAAM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AYA,CAACnE,GAAG,CAACwE,KAAKD;QACxB;IACF;AACF;AAEA,uDAAec,gDAAAA,oCAAmBA,EAAAA,EAAA;;;ACjKuC;AACzE,MAAM,cAAK;AACX,8BAA8B,QAAQ;AACtC,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,QAAQ,cAAK,oBAAoB,cAAK;AACtC;AACA;AACA,IAAI,cAAK,oBAAoB,cAAK;AAClC;AACA;AACA;AACA;AACA;AACA,YAAY,cAAK,oBAAoB,cAAK;AAC1C;AACA,UAAU;AACV,YAAY,cAAK,oBAAoB,cAAK;AAC1C;AACA;AACA;AACA;AACA,YAAY,cAAK,oBAAoB,cAAK;AAC1C;AACA,UAAU;AACV,YAAY,cAAK,oBAAoB,cAAK;AAC1C;AACA;AACA,MAAM;AACN,QAAQ,cAAK,oBAAoB,cAAK;AACtC;AACA,QAAQ,cAAK,oBAAoB,cAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,IAAI,cAAK,oBAAoB,cAAK;AAClC;AACA;AACA;;AAEA;;AC1GwD;AACxD,qFAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACjEA,MAAM,4DAAwC;AAC9C;AACA;AACA;AACA,CAAC;AACD,MAAM,yCAAqB;AAC3B;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,MAAM,gDAA4B;AAC3B,SAAS,sDAAuB;AACvC,QAAQ,gDAA4B;AACpC,mBAAmB,gDAA4B;AAC/C;AACA,eAAe,yCAAqB;AACpC;AACO,SAAS,gCAAY;AAC5B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA,WAAW,yCAAqB;AAChC;AACO,SAAS,kCAAc;AAC9B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;;AChDgE;AACzD,sCAAsC,sDAAuB;;AAEpE;;ACHA;AAGE;AAC+B;;AAEjC;;ACNsD;AACY;AACR;AACmB;AACd;AACE;AACqB;AACE;AACjF;AACP,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA,iCAAiC,mBAAY;AAC7C;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAAoB;AAClD;AACA;AACA;AACA,+BAA+B,6BAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAY;AAC5C;AACA,sBAAsB,6BAAqB;AAC3C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAgB;AAC1C;AACA,4CAA4C,kCAAc;AAC1D;AACA;AACA;AACA,aAAa;AACb;AACA,eAAe,sBAAsB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,wDAAwD,kCAAc;AACtE;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AC1HA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEA;;AC3BsD;AACqB;AACrB;AACS;AACI;AAC5D,2BAA2B,yEAAyE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kCAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD,eAAe,YAAY;AAC3B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;;AAEA;;AClFA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yDAAyD,UAAU,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC5DA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACZ4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AClBiE;AACF;AACd;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,sCAAsC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B,CAAC,EAAE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B,CAAC,EAAE,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC5DA;AACA;AACA,kCAAkC;AAClC,IAAW;AACX;AACA;;AAEA;;ACP6C;AACkC;AACa;AACrC;AACE;AACuC;AAC3D;AACyB;AACY;AAC6F;AAC3G;AACc;AACY;AACxB;AACe;AACY;AACzC;AACQ;AACP;AACc;AACa;AACrB;AACI;AACpD,8BAA8B,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D,YAAY,mBAAO,CAAC,GAA6C;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA,yBAAyB,eAAe;AACxC,gFAAgF,OAAO;AACvF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA,yBAAyB,kBAAkB,oBAAoB,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAA8C,GAAG,CAA2B;AACrG,kDAAkD,oBAAoB;AACtE;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAoB;AAC7C,iCAAiC,EAAyC;AAC1E,iBAAiB,YAAoB;AACrC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,qCAAqC;AACrC;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qFAAqF,wBAAwB;AAC7G,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD,mBAAmB,gBAAS,SAAS,cAAc;AACnD,wCAAwC,gBAAgB,EAAE,yBAAyB;AACnF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D,yCAAyC,wBAAwB;AACjE,sCAAsC,eAAe;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,yBAAyB;AACzB,+DAA+D,2BAA2B;AAC1F;AACA;AACA,qBAAqB;AACrB,iCAAiC,wBAAgB,oBAAoB,4BAAoB;AACzF,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT,YAAY,KAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC,EAAE,gBAAgB;AACzE;AACA;AACA;AACA,UAAU,MAAsD,IAAI,CAA0C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA,qCAAqC,2BAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,oBAAoB;AAC7D,wCAAwC,oBAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,YAAY,IAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA,gDAAgD,YAAY;AAC5D;AACA;AACA;AACA;AACA;AACA,8DAA8D,IAAI;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;;AAEA;;;;AC1WsD;AAC/C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AASC,kCACdF,MAAc,EACdC,IAAY;IAEZ,MAAME,kBAAkBpN,KAAKC,SAAS,CAACiN;IACvC,OAAQ,kBAAgBD,SAAO,OAAIG,kBAAgB,UAASA,kBAAgB,SAAMH,SAAO;AAC3F;AAEO,MAAMI,iCAAmBA,GAAG,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC;;;ACjD8D;AACzD,mCAAmC,2CAAuB;;AAEjE;;ACHA;AAGE;AAC0D;;AAE5D;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAK,GAAG,yEAAyB,EAAE,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAM;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,EAAE,IAAI,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEP;;AC1DgF;AAC1B;AAC/C;AACP,UAAU,KAAK,CAAC,IAAI;AACpB,WAAW,GAAG,CAAC,IAAI;AACnB,UAAU,MAAM,CAAC,IAAI;AACrB;AACA,UAAU,KAAK,CAAC,IAAI;AACpB,WAAW,KAAK,CAAC,IAAI;AACrB,WAAW,OAAO,CAAC,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AAC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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,yBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yBAAgB;AAChB,yBAAgB;AAChB,yBAAkB;AAClB,yBAAgB;AAChB,yBAAuE;AACvE;AACA,yBAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yBAAmB;AACnB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAoB;AACpB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA,yBAAqB;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oBAAoB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAiB;AACjB,WAAW;AACX;AACA,yBAAkB;AAClB,WAAW;AACX;AACA,yBAAsB;AACtB,yBAAY;AACZ;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA,yBAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,yBAAW;AACX;AACA;AACA,yBAAmB;AACnB;AACA;AACA,yBAAqB;AACrB,yBAAa;AACb;AACA;AACA,yBAAe;AACf;AACA;AACA,yBAAe;;;;;;;;;ACtaF;AACb;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA,6BAA6B,4FAA4F;AACzH;AACA;AACA;AACA,oDAAoD,kBAAkB,aAAa;;AAEnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C,mEAAmE,gFAAgF;AACnJ,gEAAgE,SAAS;AACzE,2CAA2C,SAAS;AACpD;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA,iDAAiD,WAAW;AAC5D;AACA,yBAAyB,OAAO,GAAG,qDAAqD;AACxF,+CAA+C,cAAc,EAAE,cAAc,GAAG;AAChF;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD,qBAAqB,gBAAgB;AACrC,uCAAuC,wBAAwB;AAC/D;AACA,qBAAqB,mCAAmC;AACxD,mBAAmB,cAAc;AACjC,qBAAqB,mCAAmC;AACxD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA,4EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iDAAiD;AAC9E;AACA;AACA,oDAAoD,OAAO,GAAG,4BAA4B,WAAW;AACrG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA,sBAAsB,mEAAmE;AACzF;AACA;AACA,8BAA8B,iDAAiD;AAC/E;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAML;;;;;;;;;AClVD,wCAAM,OAAO,kBAAkB,eAAe,aAAa,uOAAuO,qQAAqQ,yBAAyB,SAAS,gBAAgB,4BAA4B,uBAAuB,KAAK,WAAW,SAAS,uBAAuB,SAAS,YAAY,WAAW,KAAK,2BAA2B,SAAS,mBAAmB,gEAAgE,sBAAsB,uBAAuB,sBAAsB,4DAA4D,oBAAoB,iBAAiB,wBAAwB,yCAAyC,4BAA4B,oBAAoB,sBAAsB,oBAAoB,MAAM,sBAAsB,UAAU,MAAM,iBAAiB,QAAQ,QAAQ,WAAW,KAAK,SAAS,OAAO,6BAA6B,iBAAiB,mBAAmB,6BAA6B,KAAK,iBAAiB,sBAAsB,6CAA6C,s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,MAAM,QAAQ,sCAAsC,WAAW,EAAE,6cAA6c,+BAA+B,0DAA0D,+BAA+B,yCAAyC,EAAE,+BAA+B,4CAA4C,+BAA+B,2BAA2B,EAAE,wCAAwC,+BAA+B,uBAAuB,EAAE,+BAA+B,6CAA6C,+BAA+B,4BAA4B,EAAE,+BAA+B,wCAAwC,+BAA+B,uBAAuB,EAAE,+BAA+B,2CAA2C,+BAA+B,0BAA0B,EAAE,+BAA+B,qCAAqC,+BAA+B,oBAAoB,EAAE,+BAA+B,gDAAgD,+BAA+B,+BAA+B,EAAE,gDAAgD,+BAA+B,+BAA+B,EAAE,+BAA+B,uCAAuC,+BAA+B,sBAAsB,EAAE,+BAA+B,+CAA+C,+BAA+B,8BAA8B,EAAE,+BAA+B,4CAA4C,+BAA+B,2BAA2B,EAAE,+BAA+B,oCAAoC,+BAA+B,mBAAmB,EAAE,+BAA+B,0CAA0C,+BAA+B,yBAAyB,EAAE,+BAA+B,sCAAsC,+BAA+B,qBAAqB,EAAE,8BAA8B,4CAA4C,+BAA+B,2BAA2B,EAAE,+BAA+B,8CAA8C,+BAA+B,6BAA6B,EAAE,0CAA0C,+BAA+B,yBAAyB,EAAE,yCAAyC,+BAA+B,wBAAwB,EAAE,+BAA+B,0CAA0C,+BAA+B,yBAAyB,EAAE,2CAA2C,+BAA+B,0BAA0B,EAAE,gDAAgD,+BAA+B,+BAA+B,EAAE,gCAAgC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,gCAAgC,+BAA+B,eAAe,EAAE,iCAAiC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,uCAAuC,+BAA+B,sBAAsB,EAAE,iCAAiC,iCAAiC,+BAA+B,gBAAgB,EAAE,cAAc,yFAAyF,IAAI,iBAAiB`aZwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middleware      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXUwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middlewareexternal commonjs "node:buffer"\webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middlewareowebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middlewarecwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware^webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middlewareexternal commonjs "node:async_hooks"Twebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/cookie/index.js|middleware`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware`webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middleware`ag"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { handleFetch: null, interceptFetch: null, reader: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { handleFetch: function() { return handleFetch; }, interceptFetch: function() { return interceptFetch; }, reader: function() { return reader; } }); const _context = require("./context"); const reader = { url (req) { return req.url; }, header (req, name) { return req.headers.get(name); } }; function getTestStack() { let stack = (new Error().stack ?? '').split('\n'); // Skip the first line and find first non-empty line. for(let i = 1; i < stack.length; i++){ if (stack[i].length > 0) { stack = stack.slice(i); break; } } // Filter out franmework lines. stack = stack.filter((f)=>!f.includes('/next/dist/')); // At most 5 lines. stack = stack.slice(0, 5); // Cleanup some internal info and trim. stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); return stack.join(' '); } async function buildProxyRequest(testData, request) { const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; return { testData, api: 'fetch', request: { url, method, headers: [ ...Array.from(headers), [ 'next-test-stack', getTestStack() ] ], body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } }; } function buildResponse(proxyResponse) { const { status, headers, body } = proxyResponse.response; return new Response(body ? Buffer.from(body, 'base64') : null, { status, headers: new Headers(headers) }); } async function handleFetch(originalFetch, request) { const testInfo = (0, _context.getTestReqInfo)(request, reader); if (!testInfo) { // Passthrough non-test requests. return originalFetch(request); } const { testData, proxyPort } = testInfo; const proxyRequest = await buildProxyRequest(testData, request); const resp = await originalFetch(`http://localhost:${proxyPort}`, { method: 'POST', body: JSON.stringify(proxyRequest), next: { // @ts-ignore internal: true } }); if (!resp.ok) { throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { value: "E146", enumerable: false, configurable: true }); } const proxyResponse = await resp.json(); const { api } = proxyResponse; switch(api){ case 'continue': return originalFetch(request); case 'abort': case 'unhandled': throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { value: "E145", enumerable: false, configurable: true }); case 'fetch': return buildResponse(proxyResponse); default: return api; } } function interceptFetch(originalFetch) { global.fetch = function testFetch(input, init) { var _init_next; // Passthrough internal requests. // @ts-ignore if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { return originalFetch(input, init); } return handleFetch(originalFetch, new Request(input, init)); }; return ()=>{ global.fetch = originalFetch; }; } //# sourceMappingURL=fetch.js.mapMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{j|}~&(()=>{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue})();module.exports=n})();(module.exports = require("node:buffer");"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getTestReqInfo: null, withRequest: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getTestReqInfo: function() { return getTestReqInfo; }, withRequest: function() { return withRequest; } }); const _nodeasync_hooks = require("node:async_hooks"); const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); function extractTestInfoFromRequest(req, reader) { const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); if (!proxyPortHeader) { return undefined; } const url = reader.url(req); const proxyPort = Number(proxyPortHeader); const testData = reader.header(req, 'next-test-data') || ''; return { url, proxyPort, testData }; } function withRequest(req, reader, fn) { const testReqInfo = extractTestInfoFromRequest(req, reader); if (!testReqInfo) { return fn(); } return testStorage.run(testReqInfo, fn); } function getTestReqInfo(req, reader) { const testReqInfo = testStorage.getStore(); if (testReqInfo) { return testReqInfo; } if (req && reader) { return extractTestInfoFromRequest(req, reader); } return undefined; } //# sourceMappingURL=context.js.map3/** * @license React * react.react-server.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict"; var ReactSharedInternals = { H: null, A: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { url += "?args[]=" + encodeURIComponent(arguments[1]); for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]); } return ( "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var isArrayImpl = Array.isArray; function noop() {} var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; maybeIterable = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } var hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: void 0 !== refProp ? refProp : null, props: props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return ( "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE ); } function escape(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return ( "$" + key.replace(/[=:]/g, function (match) { return escaperLookup[match]; }) ); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch ( ("string" === typeof thenable.status ? thenable.then(noop, noop) : ((thenable.status = "pending"), thenable.then( function (fulfilledValue) { "pending" === thenable.status && ((thenable.status = "fulfilled"), (thenable.value = fulfilledValue)); }, function (error) { "pending" === thenable.status && ((thenable.status = "rejected"), (thenable.reason = error)); } )), thenable.status) ) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if ("undefined" === type || "boolean" === type) children = null; var invokeCallback = !1; if (null === children) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return ( (invokeCallback = children._init), mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ) ); } } if (invokeCallback) return ( (callback = callback(children)), (invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar), isArrayImpl(callback) ? ((escapedPrefix = ""), null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) { return c; })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (null == callback.key || (children && children.key === callback.key) ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1 ); invokeCallback = 0; var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) (nameSoFar = children[i]), (type = nextNamePrefix + getElementKey(nameSoFar, i)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if (((i = getIteratorFn(children)), "function" === typeof i)) for ( children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) (nameSoFar = nameSoFar.value), (type = nextNamePrefix + getElementKey(nameSoFar, i++)), (invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback )); else if ("object" === type) { if ("function" === typeof children.then) return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); array = String(children); throw Error( formatProdErrorMessage( 31, "[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array ) ); } return invokeCallback; } function mapChildren(children, func, context) { if (null == children) return children; var result = [], count = 0; mapIntoArray(children, result, "", "", function (child) { return func.call(context, child, count++); }); return result; } function lazyInitializer(payload) { if (-1 === payload._status) { var ctor = payload._result; ctor = ctor(); ctor.then( function (moduleObject) { if (0 === payload._status || -1 === payload._status) (payload._status = 1), (payload._result = moduleObject); }, function (error) { if (0 === payload._status || -1 === payload._status) (payload._status = 2), (payload._result = error); } ); -1 === payload._status && ((payload._status = 0), (payload._result = ctor)); } if (1 === payload._status) return payload._result.default; throw payload._result; } function createCacheRoot() { return new WeakMap(); } function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } exports.Children = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { mapChildren( children, function () { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function (children) { var n = 0; mapChildren(children, function () { n++; }); return n; }, toArray: function (children) { return ( mapChildren(children, function (child) { return child; }) || [] ); }, only: function (children) { if (!isValidElement(children)) throw Error(formatProdErrorMessage(143)); return children; } }; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; exports.cache = function (fn) { return function () { var dispatcher = ReactSharedInternals.A; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); void 0 === dispatcher && ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher)); fnMap = 0; for (var l = arguments.length; fnMap < l; fnMap++) { var arg = arguments[fnMap]; if ( "function" === typeof arg || ("object" === typeof arg && null !== arg) ) { var objectCache = dispatcher.o; null === objectCache && (dispatcher.o = objectCache = new WeakMap()); dispatcher = objectCache.get(arg); void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } else (objectCache = dispatcher.p), null === objectCache && (dispatcher.p = objectCache = new Map()), (dispatcher = objectCache.get(arg)), void 0 === dispatcher && ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher)); } if (1 === dispatcher.s) return dispatcher.v; if (2 === dispatcher.s) throw dispatcher.v; try { var result = fn.apply(null, arguments); fnMap = dispatcher; fnMap.s = 1; return (fnMap.v = result); } catch (error) { throw ((result = dispatcher), (result.s = 2), (result.v = error), error); } }; }; exports.cacheSignal = function () { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.cacheSignal() : null; }; exports.captureOwnerStack = function () { return null; }; exports.cloneElement = function (element, config, children) { if (null === element || void 0 === element) throw Error(formatProdErrorMessage(267, element)); var props = assign({}, element.props), key = element.key; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || ("ref" === propName && void 0 === config.ref) || (props[propName] = config[propName]); var propName = arguments.length - 2; if (1 === propName) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; exports.createElement = function (type, config, children) { var propName, props = {}, key = null; if (null != config) for (propName in (void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (1 === childrenLength) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in ((childrenLength = type.defaultProps), childrenLength)) void 0 === props[propName] && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; exports.createRef = function () { return { current: null }; }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; }; exports.isValidElement = isValidElement; exports.lazy = function (ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; exports.memo = function (type, compare) { return { $$typeof: REACT_MEMO_TYPE, type: type, compare: void 0 === compare ? null : compare }; }; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); }; exports.useCallback = function (callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useDebugValue = function () {}; exports.useId = function () { return ReactSharedInternals.H.useId(); }; exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; exports.version = "19.2.0-canary-0bdb9206-20250818"; )"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { RequestCookies: () => RequestCookies, ResponseCookies: () => ResponseCookies, parseCookie: () => parseCookie, parseSetCookie: () => parseSetCookie, stringifyCookie: () => stringifyCookie }); module.exports = __toCommonJS(src_exports); // src/serialize.ts function stringifyCookie(c) { var _a; const attrs = [ "path" in c && c.path && `Path=${c.path}`, "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, "domain" in c && c.domain && `Domain=${c.domain}`, "secure" in c && c.secure && "Secure", "httpOnly" in c && c.httpOnly && "HttpOnly", "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, "partitioned" in c && c.partitioned && "Partitioned", "priority" in c && c.priority && `Priority=${c.priority}` ].filter(Boolean); const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; } function parseCookie(cookie) { const map = /* @__PURE__ */ new Map(); for (const pair of cookie.split(/; */)) { if (!pair) continue; const splitAt = pair.indexOf("="); if (splitAt === -1) { map.set(pair, "true"); continue; } const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; try { map.set(key, decodeURIComponent(value != null ? value : "true")); } catch { } } return map; } function parseSetCookie(setCookie) { if (!setCookie) { return void 0; } const [[name, value], ...attributes] = parseCookie(setCookie); const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries( attributes.map(([key, value2]) => [ key.toLowerCase().replace(/-/g, ""), value2 ]) ); const cookie = { name, value: decodeURIComponent(value), domain, ...expires && { expires: new Date(expires) }, ...httponly && { httpOnly: true }, ...typeof maxage === "string" && { maxAge: Number(maxage) }, path, ...samesite && { sameSite: parseSameSite(samesite) }, ...secure && { secure: true }, ...priority && { priority: parsePriority(priority) }, ...partitioned && { partitioned: true } }; return compact(cookie); } function compact(t) { const newT = {}; for (const key in t) { if (t[key]) { newT[key] = t[key]; } } return newT; } var SAME_SITE = ["strict", "lax", "none"]; function parseSameSite(string) { string = string.toLowerCase(); return SAME_SITE.includes(string) ? string : void 0; } var PRIORITY = ["low", "medium", "high"]; function parsePriority(string) { string = string.toLowerCase(); return PRIORITY.includes(string) ? string : void 0; } function splitCookiesString(cookiesString) { if (!cookiesString) return []; var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { cookiesSeparatorFound = true; pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // src/request-cookies.ts var RequestCookies = class { constructor(requestHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); this._headers = requestHeaders; const header = requestHeaders.get("cookie"); if (header) { const parsed = parseCookie(header); for (const [name, value] of parsed) { this._parsed.set(name, { name, value }); } } } [Symbol.iterator]() { return this._parsed[Symbol.iterator](); } /** * The amount of cookies received from the client */ get size() { return this._parsed.size; } get(...args) { const name = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(name); } getAll(...args) { var _a; const all = Array.from(this._parsed); if (!args.length) { return all.map(([_, value]) => value); } const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter(([n]) => n === name).map(([_, value]) => value); } has(name) { return this._parsed.has(name); } set(...args) { const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; const map = this._parsed; map.set(name, { name, value }); this._headers.set( "cookie", Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ") ); return this; } /** * Delete the cookies matching the passed name or names in the request. */ delete(names) { const map = this._parsed; const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); this._headers.set( "cookie", Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ") ); return result; } /** * Delete all the cookies in the cookies in the request. */ clear() { this.delete(Array.from(this._parsed.keys())); return this; } /** * Format the cookies in the request as a string for logging */ [Symbol.for("edge-runtime.inspect.custom")]() { return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); } }; // src/response-cookies.ts var ResponseCookies = class { constructor(responseHeaders) { /** @internal */ this._parsed = /* @__PURE__ */ new Map(); var _a, _b, _c; this._headers = responseHeaders; const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString); if (parsed) this._parsed.set(parsed.name, parsed); } } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. */ get(...args) { const key = typeof args[0] === "string" ? args[0] : args[0].name; return this._parsed.get(key); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. */ getAll(...args) { var _a; const all = Array.from(this._parsed.values()); if (!args.length) { return all; } const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; return all.filter((c) => c.name === key); } has(name) { return this._parsed.has(name); } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. */ set(...args) { const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; const map = this._parsed; map.set(name, normalizeCookie({ name, value, ...cookie })); replace(map, this._headers); return this; } /** * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. */ delete(...args) { const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]]; return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) }); } [Symbol.for("edge-runtime.inspect.custom")]() { return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; } toString() { return [...this._parsed.values()].map(stringifyCookie).join("; "); } }; function replace(bag, headers) { headers.delete("set-cookie"); for (const [, value] of bag) { const serialized = stringifyCookie(value); headers.append("set-cookie", serialized); } } function normalizeCookie(cookie = { name: "", value: "" }) { if (typeof cookie.expires === "number") { cookie.expires = new Date(cookie.expires); } if (cookie.maxAge) { cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); } if (cookie.path === null || cookie.path === void 0) { cookie.path = "/"; } return cookie; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { RequestCookies, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie }); (D(()=>{var i={226:function(i,e){(function(o,a){"use strict";var r="1.0.35",t="",n="?",s="function",b="undefined",w="object",l="string",d="major",c="model",u="name",p="type",m="vendor",f="version",h="architecture",v="console",g="mobile",k="tablet",x="smarttv",_="wearable",y="embedded",q=350;var T="Amazon",S="Apple",z="ASUS",N="BlackBerry",A="Browser",C="Chrome",E="Edge",O="Firefox",U="Google",j="Huawei",P="LG",R="Microsoft",M="Motorola",B="Opera",V="Samsung",D="Sharp",I="Sony",W="Viera",F="Xiaomi",G="Zebra",H="Facebook",L="Chromium OS",Z="Mac OS";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]="iPad";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!="Unknown"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if("object"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window==="object"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(226);module.exports=o})();-module.exports = require("node:async_hooks");(()=>{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); } //# sourceMappingURL=server-edge.js.map'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./cjs/react.react-server.production.js'); } else { module.exports = require('./cjs/react.react-server.development.js'); } o(()=>{"use strict";var e={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.6.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();@s     n !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~it   @ V(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[550],{ /***/ 165:  S/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict";   mwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871720undefined559565__webpack_require__undefined567577392undefined18131818Bufferundefined21892194Bufferundefined37283733__webpack_require__.gundefined41264131__webpack_require__.gundefined /***/ }) , /***/ 208: _/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict";  7    8   9  : ;   !" #$%&'()*+,-./0123456789:;<=>? @ABC DEFGHIJKLMN HOPQ IR S JTUV KW X LYZ[\]^ _`abcd Oefghij klmn opqrst Suvw Txyz U{|} V~  W X  Z [ \ ] ^`a ` a   d ew T f g  h i  j k  l  m  n o  p q  r  s  t  w x   ~               !"#$%&'() * +,  , /***/ 213: /***/ ((module) => { var __dirname = "/"; webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middleware32563259trueundefined52375245__dirnameundefined, /***/ 356: $/***/ ((module) => { "use strict"; OriginalSource(external commonjs "node:buffer"RawSource, /***/ 392: webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871540undefined494500__webpack_require__undefined502519521undefined, /***/ 440: >/***/ ((__unused_webpack_module, exports) => { "use strict"; var __webpack_unused_export__; 8webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware249261undefined78827897__webpack_unused_export__undefined85258540__webpack_unused_export__undefined85658580__webpack_unused_export__undefined86058622__webpack_unused_export__undefined86508665__webpack_unused_export__undefined86908760__webpack_unused_export__undefined87888800__webpack_unused_export__undefined1027810296__webpack_unused_export__undefined1041510439__webpack_unused_export__undefined1047510494__webpack_unused_export__undefined1136711387__webpack_unused_export__undefined1230412320__webpack_unused_export__undefined1236912386__webpack_unused_export__undefined1247612497__webpack_unused_export__undefined1251712528__webpack_unused_export__undefined1267312684__webpack_unused_export__undefined1283012840__webpack_unused_export__undefined1291212930__webpack_unused_export__undefined1302613046__webpack_unused_export__undefined1306613078__webpack_unused_export__undefined1314013154__webpack_unused_export__undefined1324213256__webpack_unused_export__undefined, /***/ 443: webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware012undefined10408105150undefined, /***/ 449: 4/***/ ((module, exports, __webpack_require__) => { webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware0-1var __WEBPACK_AMD_DEFINE_RESULT__;undefined1671916731"function"undefined1673816747__webpack_require__.amdOundefined1675016757!(__WEBPACK_AMD_DEFINE_RESULT__ = (undefined1678516786).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))undefined1738217390__dirnameundefined, /***/ 521: -external commonjs "node:async_hooks"RawSource, /***/ 663: jwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/cookie/index.js|middleware8694__dirnameundefined, /***/ 720: Qwebpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware012undefined1458Object.defineProperty(exports, "__esModule", (undefined7878))undefined871640undefined516522__webpack_require__undefined524534392undefined553559__webpack_require__undefined561569165undefined642647__webpack_require__.gundefined, /***/ 814: S/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware012undefined1955trueundefined62127module.exports = __webpack_require__(440)undefined137210{}undefined, /***/ 817: E/***/ ((module, __unused_webpack_exports, __webpack_require__) => { webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middleware1565215657__webpack_require__.gundefined2457124579__dirnameundefined }, !PrefixSourceConcatSourceRawSource2__webpack_require__ => { // webpackRuntimeModules var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = (__webpack_exec__(208)); s(_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)["middleware_src/middleware"] = __webpack_exports__; } /******/ RawSource]);f n(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[550],{165:(a,b,c)=>{"use strict";var d=c(356).Buffer;Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{handleFetch:function(){return h},interceptFetch:function(){return i},reader:function(){return f}});let e=c(392),f={url:a=>a.url,header:(a,b)=>a.headers.get(b)};async function g(a,b){let{url:c,method:e,headers:f,body:g,cache:h,credentials:i,integrity:j,mode:k,redirect:l,referrer:m,referrerPolicy:n}=b;return{testData:a,api:"fetch",request:{url:c,method:e,headers:[...Array.from(f),["next-test-stack",function(){let a=(Error().stack??"").split("\n");for(let b=1;b0){a=a.slice(b);break}return(a=(a=(a=a.filter(a=>!a.includes("/next/dist/"))).slice(0,5)).map(a=>a.replace("webpack-internal:///(rsc)/","").trim())).join(" ")}()]],body:g?d.from(await b.arrayBuffer()).toString("base64"):null,cache:h,credentials:i,integrity:j,mode:k,redirect:l,referrer:m,referrerPolicy:n}}}async function h(a,b){let c=(0,e.getTestReqInfo)(b,f);if(!c)return a(b);let{testData:h,proxyPort:i}=c,j=await g(h,b),k=await a(`http://localhost:${i}`,{method:"POST",body:JSON.stringify(j),next:{internal:!0}});if(!k.ok)throw Object.defineProperty(Error(`Proxy request failed: ${k.status}`),"__NEXT_ERROR_CODE",{value:"E146",enumerable:!1,configurable:!0});let l=await k.json(),{api:m}=l;switch(m){case"continue":return a(b);case"abort":case"unhandled":throw Object.defineProperty(Error(`Proxy request aborted [${b.method} ${b.url}]`),"__NEXT_ERROR_CODE",{value:"E145",enumerable:!1,configurable:!0});case"fetch":let{status:n,headers:o,body:p}=l.response;return new Response(p?d.from(p,"base64"):null,{status:n,headers:new Headers(o)});default:return m}}function i(a){return c.g.fetch=function(b,c){var d;return(null==c||null==(d=c.next)?void 0:d.internal)?a(b,c):h(a,new Request(b,c))},()=>{c.g.fetch=a}}},208:(a,b,c)=>{"use strict";let d;c.r(b),c.d(b,{default:()=>bz});var e,f={};async function g(){return"_ENTRIES"in globalThis&&_ENTRIES.middleware_instrumentation&&await _ENTRIES.middleware_instrumentation}c.r(f),c.d(f,{config:()=>bv,middleware:()=>bu});let h=null;async function i(){if("phase-production-build"===process.env.NEXT_PHASE)return;h||(h=g());let a=await h;if(null==a?void 0:a.register)try{await a.register()}catch(a){throw a.message=`An error occurred while loading instrumentation hook: ${a.message}`,a}}async function j(...a){let b=await g();try{var c;await (null==b||null==(c=b.onRequestError)?void 0:c.call(b,...a))}catch(a){console.error("Error in instrumentation.onRequestError:",a)}}let k=null;function l(){return k||(k=i()),k}function m(a){return`The edge runtime does not support Node.js '${a}' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`}process!==c.g.process&&(process.env=c.g.process.env,c.g.process=process);try{Object.defineProperty(globalThis,"__import_unsupported",{value:function(a){let b=new Proxy(function(){},{get(b,c){if("then"===c)return{};throw Object.defineProperty(Error(m(a)),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})},construct(){throw Object.defineProperty(Error(m(a)),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})},apply(c,d,e){if("function"==typeof e[0])return e[0](b);throw Object.defineProperty(Error(m(a)),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}});return new Proxy({},{get:()=>b})},enumerable:!1,configurable:!1})}catch{}l();class n extends Error{constructor({page:a}){super(`The middleware "${a}" accepts an async API directly with the form: export function middleware(request, event) { return NextResponse.redirect('/new-location') } Read more: https://nextjs.org/docs/messages/middleware-new-signature `)}}class o extends Error{constructor(){super(`The request.page has been deprecated in favour of \`URLPattern\`. Read more: https://nextjs.org/docs/messages/middleware-request-page `)}}class p extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function. Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent `)}}let q="_N_T_",r={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"};function s(a){var b,c,d,e,f,g=[],h=0;function i(){for(;h=a.length)&&g.push(a.substring(b,a.length))}return g}function t(a){let b={},c=[];if(a)for(let[d,e]of a.entries())"set-cookie"===d.toLowerCase()?(c.push(...s(e)),b[d]=1===c.length?c[0]:c):b[d]=e;return b}function u(a){try{return String(new URL(String(a)))}catch(b){throw Object.defineProperty(Error(`URL is malformed "${String(a)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:b}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}({...r,GROUP:{builtinReact:[r.reactServerComponents,r.actionBrowser],serverOnly:[r.reactServerComponents,r.actionBrowser,r.instrument,r.middleware],neutralTarget:[r.apiNode,r.apiEdge],clientOnly:[r.serverSideRendering,r.appPagesBrowser],bundled:[r.reactServerComponents,r.actionBrowser,r.serverSideRendering,r.appPagesBrowser,r.shared,r.instrument,r.middleware],appPages:[r.reactServerComponents,r.serverSideRendering,r.appPagesBrowser,r.actionBrowser]}});let v=Symbol("response"),w=Symbol("passThrough"),x=Symbol("waitUntil");class y{constructor(a,b){this[w]=!1,this[x]=b?{kind:"external",function:b}:{kind:"internal",promises:[]}}respondWith(a){this[v]||(this[v]=Promise.resolve(a))}passThroughOnException(){this[w]=!0}waitUntil(a){if("external"===this[x].kind)return(0,this[x].function)(a);this[x].promises.push(a)}}class z extends y{constructor(a){var b;super(a.request,null==(b=a.context)?void 0:b.waitUntil),this.sourcePage=a.page}get request(){throw Object.defineProperty(new n({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}respondWith(){throw Object.defineProperty(new n({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}function A(a){return a.replace(/\/$/,"")||"/"}function B(a){let b=a.indexOf("#"),c=a.indexOf("?"),d=c>-1&&(b<0||c-1?{pathname:a.substring(0,d?c:b),query:d?a.substring(c,b>-1?b:void 0):"",hash:b>-1?a.slice(b):""}:{pathname:a,query:"",hash:""}}function C(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:d,hash:e}=B(a);return""+b+c+d+e}function D(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:d,hash:e}=B(a);return""+c+b+d+e}function E(a,b){if("string"!=typeof a)return!1;let{pathname:c}=B(a);return c===b||c.startsWith(b+"/")}let F=new WeakMap;function G(a,b){let c;if(!b)return{pathname:a};let d=F.get(b);d||(d=b.map(a=>a.toLowerCase()),F.set(b,d));let e=a.split("/",2);if(!e[1])return{pathname:a};let f=e[1].toLowerCase(),g=d.indexOf(f);return g<0?{pathname:a}:(c=b[g],{pathname:a=a.slice(c.length+1)||"/",detectedLocale:c})}let H=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function I(a,b){return new URL(String(a).replace(H,"localhost"),b&&String(b).replace(H,"localhost"))}let J=Symbol("NextURLInternal");class K{constructor(a,b,c){let d,e;"object"==typeof b&&"pathname"in b||"string"==typeof b?(d=b,e=c||{}):e=c||b||{},this[J]={url:I(a,d??e.base),options:e,basePath:""},this.analyze()}analyze(){var a,b,c,d,e;let f=function(a,b){var c,d;let{basePath:e,i18n:f,trailingSlash:g}=null!=(c=b.nextConfig)?c:{},h={pathname:a,trailingSlash:"/"!==a?a.endsWith("/"):g};e&&E(h.pathname,e)&&(h.pathname=function(a,b){if(!E(a,b))return a;let c=a.slice(b.length);return c.startsWith("/")?c:"/"+c}(h.pathname,e),h.basePath=e);let i=h.pathname;if(h.pathname.startsWith("/_next/data/")&&h.pathname.endsWith(".json")){let a=h.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/");h.buildId=a[0],i="index"!==a[1]?"/"+a.slice(1).join("/"):"/",!0===b.parseData&&(h.pathname=i)}if(f){let a=b.i18nProvider?b.i18nProvider.analyze(h.pathname):G(h.pathname,f.locales);h.locale=a.detectedLocale,h.pathname=null!=(d=a.pathname)?d:h.pathname,!a.detectedLocale&&h.buildId&&(a=b.i18nProvider?b.i18nProvider.analyze(i):G(i,f.locales)).detectedLocale&&(h.locale=a.detectedLocale)}return h}(this[J].url.pathname,{nextConfig:this[J].options.nextConfig,parseData:!0,i18nProvider:this[J].options.i18nProvider}),g=function(a,b){let c;if((null==b?void 0:b.host)&&!Array.isArray(b.host))c=b.host.toString().split(":",1)[0];else{if(!a.hostname)return;c=a.hostname}return c.toLowerCase()}(this[J].url,this[J].options.headers);this[J].domainLocale=this[J].options.i18nProvider?this[J].options.i18nProvider.detectDomainLocale(g):function(a,b,c){if(a)for(let f of(c&&(c=c.toLowerCase()),a)){var d,e;if(b===(null==(d=f.domain)?void 0:d.split(":",1)[0].toLowerCase())||c===f.defaultLocale.toLowerCase()||(null==(e=f.locales)?void 0:e.some(a=>a.toLowerCase()===c)))return f}}(null==(b=this[J].options.nextConfig)||null==(a=b.i18n)?void 0:a.domains,g);let h=(null==(c=this[J].domainLocale)?void 0:c.defaultLocale)||(null==(e=this[J].options.nextConfig)||null==(d=e.i18n)?void 0:d.defaultLocale);this[J].url.pathname=f.pathname,this[J].defaultLocale=h,this[J].basePath=f.basePath??"",this[J].buildId=f.buildId,this[J].locale=f.locale??h,this[J].trailingSlash=f.trailingSlash}formatPathname(){var a;let b;return b=function(a,b,c,d){if(!b||b===c)return a;let e=a.toLowerCase();return!d&&(E(e,"/api")||E(e,"/"+b.toLowerCase()))?a:C(a,"/"+b)}((a={basePath:this[J].basePath,buildId:this[J].buildId,defaultLocale:this[J].options.forceLocale?void 0:this[J].defaultLocale,locale:this[J].locale,pathname:this[J].url.pathname,trailingSlash:this[J].trailingSlash}).pathname,a.locale,a.buildId?void 0:a.defaultLocale,a.ignorePrefix),(a.buildId||!a.trailingSlash)&&(b=A(b)),a.buildId&&(b=D(C(b,"/_next/data/"+a.buildId),"/"===a.pathname?"index.json":".json")),b=C(b,a.basePath),!a.buildId&&a.trailingSlash?b.endsWith("/")?b:D(b,"/"):A(b)}formatSearch(){return this[J].url.search}get buildId(){return this[J].buildId}set buildId(a){this[J].buildId=a}get locale(){return this[J].locale??""}set locale(a){var b,c;if(!this[J].locale||!(null==(c=this[J].options.nextConfig)||null==(b=c.i18n)?void 0:b.locales.includes(a)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${a}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[J].locale=a}get defaultLocale(){return this[J].defaultLocale}get domainLocale(){return this[J].domainLocale}get searchParams(){return this[J].url.searchParams}get host(){return this[J].url.host}set host(a){this[J].url.host=a}get hostname(){return this[J].url.hostname}set hostname(a){this[J].url.hostname=a}get port(){return this[J].url.port}set port(a){this[J].url.port=a}get protocol(){return this[J].url.protocol}set protocol(a){this[J].url.protocol=a}get href(){let a=this.formatPathname(),b=this.formatSearch();return`${this.protocol}//${this.host}${a}${b}${this.hash}`}set href(a){this[J].url=I(a),this.analyze()}get origin(){return this[J].url.origin}get pathname(){return this[J].url.pathname}set pathname(a){this[J].url.pathname=a}get hash(){return this[J].url.hash}set hash(a){this[J].url.hash=a}get search(){return this[J].url.search}set search(a){this[J].url.search=a}get password(){return this[J].url.password}set password(a){this[J].url.password=a}get username(){return this[J].url.username}set username(a){this[J].url.username=a}get basePath(){return this[J].basePath}set basePath(a){this[J].basePath=a.startsWith("/")?a:`/${a}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new K(String(this),this[J].options)}}var L=c(443);let M=Symbol("internal request");class N extends Request{constructor(a,b={}){let c="string"!=typeof a&&"url"in a?a.url:String(a);u(c),a instanceof Request?super(a,b):super(c,b);let d=new K(c,{headers:t(this.headers),nextConfig:b.nextConfig});this[M]={cookies:new L.RequestCookies(this.headers),nextUrl:d,url:d.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[M].cookies}get nextUrl(){return this[M].nextUrl}get page(){throw new o}get ua(){throw new p}get url(){return this[M].url}}class O{static get(a,b,c){let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}static set(a,b,c,d){return Reflect.set(a,b,c,d)}static has(a,b){return Reflect.has(a,b)}static deleteProperty(a,b){return Reflect.deleteProperty(a,b)}}let P=Symbol("internal response"),Q=new Set([301,302,303,307,308]);function R(a,b){var c;if(null==a||null==(c=a.request)?void 0:c.headers){if(!(a.request.headers instanceof Headers))throw Object.defineProperty(Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});let c=[];for(let[d,e]of a.request.headers)b.set("x-middleware-request-"+d,e),c.push(d);b.set("x-middleware-override-headers",c.join(","))}}class S extends Response{constructor(a,b={}){super(a,b);let c=this.headers,d=new Proxy(new L.ResponseCookies(c),{get(a,d,e){switch(d){case"delete":case"set":return(...e)=>{let f=Reflect.apply(a[d],a,e),g=new Headers(c);return f instanceof L.ResponseCookies&&c.set("x-middleware-set-cookie",f.getAll().map(a=>(0,L.stringifyCookie)(a)).join(",")),R(b,g),f};default:return O.get(a,d,e)}}});this[P]={cookies:d,url:b.url?new K(b.url,{headers:t(c),nextConfig:b.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[P].cookies}static json(a,b){let c=Response.json(a,b);return new S(c.body,c)}static redirect(a,b){let c="number"==typeof b?b:(null==b?void 0:b.status)??307;if(!Q.has(c))throw Object.defineProperty(RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});let d="object"==typeof b?b:{},e=new Headers(null==d?void 0:d.headers);return e.set("Location",u(a)),new S(null,{...d,headers:e,status:c})}static rewrite(a,b){let c=new Headers(null==b?void 0:b.headers);return c.set("x-middleware-rewrite",u(a)),R(b,c),new S(null,{...b,headers:c})}static next(a){let b=new Headers(null==a?void 0:a.headers);return b.set("x-middleware-next","1"),R(a,b),new S(null,{...a,headers:b})}}function T(a,b){let c="string"==typeof b?new URL(b):b,d=new URL(a,b),e=d.origin===c.origin;return{url:e?d.toString().slice(c.origin.length):d.toString(),isRelative:e}}let U="next-router-prefetch",V=["rsc","next-router-state-tree",U,"next-hmr-refresh","next-router-segment-prefetch"],W="_rsc";class X extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new X}}class Y extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return O.get(b,c,d);let e=c.toLowerCase(),f=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==f)return O.get(b,f,d)},set(b,c,d,e){if("symbol"==typeof c)return O.set(b,c,d,e);let f=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===f);return O.set(b,g??c,d,e)},has(b,c){if("symbol"==typeof c)return O.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&O.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return O.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||O.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return X.callable;default:return O.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new Y(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}let Z=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class ${disable(){throw Z}getStore(){}run(){throw Z}exit(){throw Z}enterWith(){throw Z}static bind(a){return a}}let _="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function aa(){return _?new _:new $}let ab=aa();class ac extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new ac}}class ad{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return ac.callable;default:return O.get(a,b,c)}}})}}let ae=Symbol.for("next.mutated.cookies");class af{static wrap(a,b){let c=new L.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,f=()=>{let a=ab.getStore();if(a&&(a.pathWasRevalidated=!0),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new L.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},g=new Proxy(c,{get(a,b,c){switch(b){case ae:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),g}finally{f()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),g}finally{f()}};default:return O.get(a,b,c)}}});return g}}function ag(a,b){if("action"!==a.phase)throw new ac}var ah=function(a){return a.handleRequest="BaseServer.handleRequest",a.run="BaseServer.run",a.pipe="BaseServer.pipe",a.getStaticHTML="BaseServer.getStaticHTML",a.render="BaseServer.render",a.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",a.renderToResponse="BaseServer.renderToResponse",a.renderToHTML="BaseServer.renderToHTML",a.renderError="BaseServer.renderError",a.renderErrorToResponse="BaseServer.renderErrorToResponse",a.renderErrorToHTML="BaseServer.renderErrorToHTML",a.render404="BaseServer.render404",a}(ah||{}),ai=function(a){return a.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",a.loadComponents="LoadComponents.loadComponents",a}(ai||{}),aj=function(a){return a.getRequestHandler="NextServer.getRequestHandler",a.getServer="NextServer.getServer",a.getServerRequestHandler="NextServer.getServerRequestHandler",a.createServer="createServer.createServer",a}(aj||{}),ak=function(a){return a.compression="NextNodeServer.compression",a.getBuildId="NextNodeServer.getBuildId",a.createComponentTree="NextNodeServer.createComponentTree",a.clientComponentLoading="NextNodeServer.clientComponentLoading",a.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",a.generateStaticRoutes="NextNodeServer.generateStaticRoutes",a.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",a.generatePublicRoutes="NextNodeServer.generatePublicRoutes",a.generateImageRoutes="NextNodeServer.generateImageRoutes.route",a.sendRenderResult="NextNodeServer.sendRenderResult",a.proxyRequest="NextNodeServer.proxyRequest",a.runApi="NextNodeServer.runApi",a.render="NextNodeServer.render",a.renderHTML="NextNodeServer.renderHTML",a.imageOptimizer="NextNodeServer.imageOptimizer",a.getPagePath="NextNodeServer.getPagePath",a.getRoutesManifest="NextNodeServer.getRoutesManifest",a.findPageComponents="NextNodeServer.findPageComponents",a.getFontManifest="NextNodeServer.getFontManifest",a.getServerComponentManifest="NextNodeServer.getServerComponentManifest",a.getRequestHandler="NextNodeServer.getRequestHandler",a.renderToHTML="NextNodeServer.renderToHTML",a.renderError="NextNodeServer.renderError",a.renderErrorToHTML="NextNodeServer.renderErrorToHTML",a.render404="NextNodeServer.render404",a.startResponse="NextNodeServer.startResponse",a.route="route",a.onProxyReq="onProxyReq",a.apiResolver="apiResolver",a.internalFetch="internalFetch",a}(ak||{}),al=function(a){return a.startServer="startServer.startServer",a}(al||{}),am=function(a){return a.getServerSideProps="Render.getServerSideProps",a.getStaticProps="Render.getStaticProps",a.renderToString="Render.renderToString",a.renderDocument="Render.renderDocument",a.createBodyResult="Render.createBodyResult",a}(am||{}),an=function(a){return a.renderToString="AppRender.renderToString",a.renderToReadableStream="AppRender.renderToReadableStream",a.getBodyResult="AppRender.getBodyResult",a.fetch="AppRender.fetch",a}(an||{}),ao=function(a){return a.executeRoute="Router.executeRoute",a}(ao||{}),ap=function(a){return a.runHandler="Node.runHandler",a}(ap||{}),aq=function(a){return a.runHandler="AppRouteRouteHandlers.runHandler",a}(aq||{}),ar=function(a){return a.generateMetadata="ResolveMetadata.generateMetadata",a.generateViewport="ResolveMetadata.generateViewport",a}(ar||{}),as=function(a){return a.execute="Middleware.execute",a}(as||{});let at=new Set(["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"]),au=new Set(["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"]);function av(a){return null!==a&&"object"==typeof a&&"then"in a&&"function"==typeof a.then}let aw=process.env.NEXT_OTEL_PERFORMANCE_PREFIX,{context:ax,propagation:ay,trace:az,SpanStatusCode:aA,SpanKind:aB,ROOT_CONTEXT:aC}=d=c(817);class aD extends Error{constructor(a,b){super(),this.bubble=a,this.result=b}}let aE=(a,b)=>{(function(a){return"object"==typeof a&&null!==a&&a instanceof aD})(b)&&b.bubble?a.setAttribute("next.bubble",!0):(b&&(a.recordException(b),a.setAttribute("error.type",b.name)),a.setStatus({code:aA.ERROR,message:null==b?void 0:b.message})),a.end()},aF=new Map,aG=d.createContextKey("next.rootSpanId"),aH=0,aI={set(a,b,c){a.push({key:b,value:c})}};class aJ{getTracerInstance(){return az.getTracer("next.js","0.0.1")}getContext(){return ax}getTracePropagationData(){let a=ax.active(),b=[];return ay.inject(a,b,aI),b}getActiveScopeSpan(){return az.getSpan(null==ax?void 0:ax.active())}withPropagatedContext(a,b,c){let d=ax.active();if(az.getSpanContext(d))return b();let e=ay.extract(d,a,c);return ax.with(e,b)}trace(...a){var b;let[c,d,e]=a,{fn:f,options:g}="function"==typeof d?{fn:d,options:{}}:{fn:e,options:{...d}},h=g.spanName??c;if(!at.has(c)&&"1"!==process.env.NEXT_OTEL_VERBOSE||g.hideSpan)return f();let i=this.getSpanContext((null==g?void 0:g.parentSpan)??this.getActiveScopeSpan()),j=!1;i?(null==(b=az.getSpanContext(i))?void 0:b.isRemote)&&(j=!0):(i=(null==ax?void 0:ax.active())??aC,j=!0);let k=aH++;return g.attributes={"next.span_name":h,"next.span_type":c,...g.attributes},ax.with(i.setValue(aG,k),()=>this.getTracerInstance().startActiveSpan(h,g,a=>{let b;aw&&c&&au.has(c)&&(b="performance"in globalThis&&"measure"in performance?globalThis.performance.now():void 0);let d=!1,e=()=>{!d&&(d=!0,aF.delete(k),b&&performance.measure(`${aw}:next-${(c.split(".").pop()||"").replace(/[A-Z]/g,a=>"-"+a.toLowerCase())}`,{start:b,end:performance.now()}))};if(j&&aF.set(k,new Map(Object.entries(g.attributes??{}))),f.length>1)try{return f(a,b=>aE(a,b))}catch(b){throw aE(a,b),b}finally{e()}try{let b=f(a);if(av(b))return b.then(b=>(a.end(),b)).catch(b=>{throw aE(a,b),b}).finally(e);return a.end(),e(),b}catch(b){throw aE(a,b),e(),b}}))}wrap(...a){let b=this,[c,d,e]=3===a.length?a:[a[0],{},a[1]];return at.has(c)||"1"===process.env.NEXT_OTEL_VERBOSE?function(){let a=d;"function"==typeof a&&"function"==typeof e&&(a=a.apply(this,arguments));let f=arguments.length-1,g=arguments[f];if("function"!=typeof g)return b.trace(c,a,()=>e.apply(this,arguments));{let d=b.getContext().bind(ax.active(),g);return b.trace(c,a,(a,b)=>(arguments[f]=function(a){return null==b||b(a),d.apply(this,arguments)},e.apply(this,arguments)))}}:e}startSpan(...a){let[b,c]=a,d=this.getSpanContext((null==c?void 0:c.parentSpan)??this.getActiveScopeSpan());return this.getTracerInstance().startSpan(b,c,d)}getSpanContext(a){return a?az.setSpan(ax.active(),a):void 0}getRootSpanAttributes(){let a=ax.active().getValue(aG);return aF.get(a)}setRootSpanAttribute(a,b){let c=ax.active().getValue(aG),d=aF.get(c);d&&d.set(a,b)}}let aK=(()=>{let a=new aJ;return()=>a})(),aL="__prerender_bypass";Symbol("__next_preview_data"),Symbol(aL);class aM{constructor(a,b,c,d){var e;let f=a&&function(a,b){let c=Y.from(a.headers);return{isOnDemandRevalidate:c.get("x-prerender-revalidate")===b.previewModeId,revalidateOnlyGenerated:c.has("x-prerender-revalidate-if-generated")}}(b,a).isOnDemandRevalidate,g=null==(e=c.get(aL))?void 0:e.value;this._isEnabled=!!(!f&&g&&a&&g===a.previewModeId),this._previewModeId=null==a?void 0:a.previewModeId,this._mutableCookies=d}get isEnabled(){return this._isEnabled}enable(){if(!this._previewModeId)throw Object.defineProperty(Error("Invariant: previewProps missing previewModeId this should never happen"),"__NEXT_ERROR_CODE",{value:"E93",enumerable:!1,configurable:!0});this._mutableCookies.set({name:aL,value:this._previewModeId,httpOnly:!0,sameSite:"none",secure:!0,path:"/"}),this._isEnabled=!0}disable(){this._mutableCookies.set({name:aL,value:"",httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:new Date(0)}),this._isEnabled=!1}}function aN(a,b){if("x-middleware-set-cookie"in a.headers&&"string"==typeof a.headers["x-middleware-set-cookie"]){let c=a.headers["x-middleware-set-cookie"],d=new Headers;for(let a of s(c))d.append("set-cookie",a);for(let a of new L.ResponseCookies(d).getAll())b.set(a)}}let aO=aa();var aP=c(213),aQ=c.n(aP);class aR extends Error{constructor(a,b){super("Invariant: "+(a.endsWith(".")?a:a+".")+" This is a bug in Next.js.",b),this.name="InvariantError"}}class aS{constructor(a,b,c){this.prev=null,this.next=null,this.key=a,this.data=b,this.size=c}}class aT{constructor(){this.prev=null,this.next=null}}class aU{constructor(a,b,c){this.cache=new Map,this.totalSize=0,this.maxSize=a,this.calculateSize=b,this.onEvict=c,this.head=new aT,this.tail=new aT,this.head.next=this.tail,this.tail.prev=this.head}addToHead(a){a.prev=this.head,a.next=this.head.next,this.head.next.prev=a,this.head.next=a}removeNode(a){a.prev.next=a.next,a.next.prev=a.prev}moveToHead(a){this.removeNode(a),this.addToHead(a)}removeTail(){let a=this.tail.prev;return this.removeNode(a),a}set(a,b){let c=(null==this.calculateSize?void 0:this.calculateSize.call(this,b))??1;if(c<=0)throw Object.defineProperty(Error(`LRUCache: calculateSize returned ${c}, but size must be > 0. Items with size 0 would never be evicted, causing unbounded cache growth.`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});if(c>this.maxSize)return console.warn("Single item size exceeds maxSize"),!1;let d=this.cache.get(a);if(d)d.data=b,this.totalSize=this.totalSize-d.size+c,d.size=c,this.moveToHead(d);else{let d=new aS(a,b,c);this.cache.set(a,d),this.addToHead(d),this.totalSize+=c}for(;this.totalSize>this.maxSize&&this.cache.size>0;){let a=this.removeTail();this.cache.delete(a.key),this.totalSize-=a.size,null==this.onEvict||this.onEvict.call(this,a.key,a.data)}return!0}has(a){return this.cache.has(a)}get(a){let b=this.cache.get(a);if(b)return this.moveToHead(b),b.data}*[Symbol.iterator](){let a=this.head.next;for(;a&&a!==this.tail;){let b=a;yield[b.key,b.data],a=a.next}}remove(a){let b=this.cache.get(a);b&&(this.removeNode(b),this.cache.delete(a),this.totalSize-=b.size)}get size(){return this.cache.size}get currentSize(){return this.totalSize}}c(356).Buffer,new aU(0x3200000,a=>a.size),process.env.NEXT_PRIVATE_DEBUG_CACHE&&console.debug.bind(console,"DefaultCacheHandler:"),process.env.NEXT_PRIVATE_DEBUG_CACHE&&((a,...b)=>{console.log(`use-cache: ${a}`,...b)}),Symbol.for("@next/cache-handlers");let aV=Symbol.for("@next/cache-handlers-map"),aW=Symbol.for("@next/cache-handlers-set"),aX=globalThis;function aY(){if(aX[aV])return aX[aV].entries()}async function aZ(a,b){if(!a)return b();let c=a$(a);try{return await b()}finally{let b=function(a,b){let c=new Set(a.pendingRevalidatedTags),d=new Set(a.pendingRevalidateWrites);return{pendingRevalidatedTags:b.pendingRevalidatedTags.filter(a=>!c.has(a)),pendingRevalidates:Object.fromEntries(Object.entries(b.pendingRevalidates).filter(([b])=>!(b in a.pendingRevalidates))),pendingRevalidateWrites:b.pendingRevalidateWrites.filter(a=>!d.has(a))}}(c,a$(a));await a0(a,b)}}function a$(a){return{pendingRevalidatedTags:a.pendingRevalidatedTags?[...a.pendingRevalidatedTags]:[],pendingRevalidates:{...a.pendingRevalidates},pendingRevalidateWrites:a.pendingRevalidateWrites?[...a.pendingRevalidateWrites]:[]}}async function a_(a,b){if(0===a.length)return;let c=[];b&&c.push(b.revalidateTag(a));let d=function(){if(aX[aW])return aX[aW].values()}();if(d)for(let b of d)c.push(b.expireTags(...a));await Promise.all(c)}async function a0(a,b){let c=(null==b?void 0:b.pendingRevalidatedTags)??a.pendingRevalidatedTags??[],d=(null==b?void 0:b.pendingRevalidates)??a.pendingRevalidates??{},e=(null==b?void 0:b.pendingRevalidateWrites)??a.pendingRevalidateWrites??[];return Promise.all([a_(c,a.incrementalCache),...Object.values(d),...e])}let a1=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class a2{disable(){throw a1}getStore(){}run(){throw a1}exit(){throw a1}enterWith(){throw a1}static bind(a){return a}}let a3="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage,a4=a3?new a3:new a2;class a5{constructor({waitUntil:a,onClose:b,onTaskError:c}){this.workUnitStores=new Set,this.waitUntil=a,this.onClose=b,this.onTaskError=c,this.callbackQueue=new(aQ()),this.callbackQueue.pause()}after(a){if(av(a))this.waitUntil||a6(),this.waitUntil(a.catch(a=>this.reportTaskError("promise",a)));else if("function"==typeof a)this.addCallback(a);else throw Object.defineProperty(Error("`after()`: Argument must be a promise or a function"),"__NEXT_ERROR_CODE",{value:"E50",enumerable:!1,configurable:!0})}addCallback(a){var b;this.waitUntil||a6();let c=aO.getStore();c&&this.workUnitStores.add(c);let d=a4.getStore(),e=d?d.rootTaskSpawnPhase:null==c?void 0:c.phase;this.runCallbacksOnClosePromise||(this.runCallbacksOnClosePromise=this.runCallbacksOnClose(),this.waitUntil(this.runCallbacksOnClosePromise));let f=(b=async()=>{try{await a4.run({rootTaskSpawnPhase:e},()=>a())}catch(a){this.reportTaskError("function",a)}},a3?a3.bind(b):a2.bind(b));this.callbackQueue.add(f)}async runCallbacksOnClose(){return await new Promise(a=>this.onClose(a)),this.runCallbacks()}async runCallbacks(){if(0===this.callbackQueue.size)return;for(let a of this.workUnitStores)a.phase="after";let a=ab.getStore();if(!a)throw Object.defineProperty(new aR("Missing workStore in AfterContext.runCallbacks"),"__NEXT_ERROR_CODE",{value:"E547",enumerable:!1,configurable:!0});return aZ(a,()=>(this.callbackQueue.start(),this.callbackQueue.onIdle()))}reportTaskError(a,b){if(console.error("promise"===a?"A promise passed to `after()` rejected:":"An error occurred in a function passed to `after()`:",b),this.onTaskError)try{null==this.onTaskError||this.onTaskError.call(this,b)}catch(a){console.error(Object.defineProperty(new aR("`onTaskError` threw while handling an error thrown from an `after` task",{cause:a}),"__NEXT_ERROR_CODE",{value:"E569",enumerable:!1,configurable:!0}))}}}function a6(){throw Object.defineProperty(Error("`after()` will not work correctly, because `waitUntil` is not available in the current environment."),"__NEXT_ERROR_CODE",{value:"E91",enumerable:!1,configurable:!0})}function a7(a){let b,c={then:(d,e)=>(b||(b=a()),b.then(a=>{c.value=a}).catch(()=>{}),b.then(d,e))};return c}class a8{onClose(a){if(this.isClosed)throw Object.defineProperty(Error("Cannot subscribe to a closed CloseController"),"__NEXT_ERROR_CODE",{value:"E365",enumerable:!1,configurable:!0});this.target.addEventListener("close",a),this.listeners++}dispatchClose(){if(this.isClosed)throw Object.defineProperty(Error("Cannot close a CloseController multiple times"),"__NEXT_ERROR_CODE",{value:"E229",enumerable:!1,configurable:!0});this.listeners>0&&this.target.dispatchEvent(new Event("close")),this.isClosed=!0}constructor(){this.target=new EventTarget,this.listeners=0,this.isClosed=!1}}function a9(){return{previewModeId:process.env.__NEXT_PREVIEW_MODE_ID||"",previewModeSigningKey:process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY||"",previewModeEncryptionKey:process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY||""}}let ba=Symbol.for("@next/request-context");async function bb(a,b,c){let d=[],e=c&&c.size>0;for(let b of(a=>{let b=["/layout"];if(a.startsWith("/")){let c=a.split("/");for(let a=1;ae.getExpiration(...a)));return b}(d)}}class bc extends N{constructor(a){super(a.input,a.init),this.sourcePage=a.page}get request(){throw Object.defineProperty(new n({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}respondWith(){throw Object.defineProperty(new n({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}waitUntil(){throw Object.defineProperty(new n({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}let bd={keys:a=>Array.from(a.keys()),get:(a,b)=>a.get(b)??void 0},be=(a,b)=>aK().withPropagatedContext(a.headers,b,bd),bf=!1;async function bg(a){var b;let d,e;if(!bf&&(bf=!0,"true"===process.env.NEXT_PRIVATE_TEST_PROXY)){let{interceptTestApis:a,wrapRequestHandler:b}=c(720);a(),be=b(be)}await l();let f=void 0!==globalThis.__BUILD_MANIFEST;a.request.url=a.request.url.replace(/\.rsc($|\?)/,"$1");let g=a.bypassNextUrl?new URL(a.request.url):new K(a.request.url,{headers:a.request.headers,nextConfig:a.request.nextConfig});for(let a of[...g.searchParams.keys()]){let b=g.searchParams.getAll(a),c=function(a){for(let b of["nxtP","nxtI"])if(a!==b&&a.startsWith(b))return a.substring(b.length);return null}(a);if(c){for(let a of(g.searchParams.delete(c),b))g.searchParams.append(c,a);g.searchParams.delete(a)}}let h=process.env.__NEXT_BUILD_ID||"";"buildId"in g&&(h=g.buildId||"",g.buildId="");let i=function(a){let b=new Headers;for(let[c,d]of Object.entries(a))for(let a of Array.isArray(d)?d:[d])void 0!==a&&("number"==typeof a&&(a=a.toString()),b.append(c,a));return b}(a.request.headers),j=i.has("x-nextjs-data"),k="1"===i.get("rsc");j&&"/index"===g.pathname&&(g.pathname="/");let m=new Map;if(!f)for(let a of V){let b=i.get(a);null!==b&&(m.set(a,b),i.delete(a))}let n=g.searchParams.get(W),o=new bc({page:a.page,input:(function(a){let b="string"==typeof a,c=b?new URL(a):a;return c.searchParams.delete(W),b?c.toString():c})(g).toString(),init:{body:a.request.body,headers:i,method:a.request.method,nextConfig:a.request.nextConfig,signal:a.request.signal}});j&&Object.defineProperty(o,"__isData",{enumerable:!1,value:!0}),!globalThis.__incrementalCacheShared&&a.IncrementalCache&&(globalThis.__incrementalCache=new a.IncrementalCache({CurCacheHandler:a.incrementalCacheHandler,minimalMode:!0,fetchCacheKeyPrefix:"",dev:!1,requestHeaders:a.request.headers,getPrerenderManifest:()=>({version:-1,routes:{},dynamicRoutes:{},notFoundRoutes:[],preview:a9()})}));let p=a.request.waitUntil??(null==(b=function(){let a=globalThis[ba];return null==a?void 0:a.get()}())?void 0:b.waitUntil),q=new z({request:o,page:a.page,context:p?{waitUntil:p}:void 0});if((d=await be(o,()=>{if("/middleware"===a.page||"/src/middleware"===a.page){let b=q.waitUntil.bind(q),c=new a8;return aK().trace(as.execute,{spanName:`middleware ${o.method} ${o.nextUrl.pathname}`,attributes:{"http.target":o.nextUrl.pathname,"http.method":o.method}},async()=>{try{var d,f,g,i,j,k;let l=a9(),m=await bb("/",o.nextUrl,null),n=(j=o.nextUrl,k=a=>{e=a},function(a,b,c,d,e,f,g,h,i,j,k,l){function m(a){c&&c.setHeader("Set-Cookie",a)}let n={};return{type:"request",phase:a,implicitTags:f,url:{pathname:d.pathname,search:d.search??""},rootParams:e,get headers(){return n.headers||(n.headers=function(a){let b=Y.from(a);for(let a of V)b.delete(a);return Y.seal(b)}(b.headers)),n.headers},get cookies(){if(!n.cookies){let a=new L.RequestCookies(Y.from(b.headers));aN(b,a),n.cookies=ad.seal(a)}return n.cookies},set cookies(value){n.cookies=value},get mutableCookies(){if(!n.mutableCookies){let a=function(a,b){let c=new L.RequestCookies(Y.from(a));return af.wrap(c,b)}(b.headers,g||(c?m:void 0));aN(b,a),n.mutableCookies=a}return n.mutableCookies},get userspaceMutableCookies(){return n.userspaceMutableCookies||(n.userspaceMutableCookies=function(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return ag(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return ag(a,"cookies().set"),c.set(...d),b};default:return O.get(c,d,e)}}});return b}(this)),n.userspaceMutableCookies},get draftMode(){return n.draftMode||(n.draftMode=new aM(i,b,this.cookies,this.mutableCookies)),n.draftMode},renderResumeDataCache:h??null,isHmrRefresh:j,serverComponentsHmrCache:k||globalThis.__serverComponentsHmrCache,devFallbackParams:null}}("action",o,void 0,j,{},m,k,void 0,l,!1,void 0,null)),p=function({page:a,renderOpts:b,isPrefetchRequest:c,buildId:d,previouslyRevalidatedTags:e}){var f;let g=!b.shouldWaitOnAllReady&&!b.supportsDynamicResponse&&!b.isDraftMode&&!b.isPossibleServerAction,h=b.dev??!1,i=h||g&&(!!process.env.NEXT_DEBUG_BUILD||"1"===process.env.NEXT_SSG_FETCH_METRICS),j={isStaticGeneration:g,page:a,route:(f=a.split("/").reduce((a,b,c,d)=>b?"("===b[0]&&b.endsWith(")")||"@"===b[0]||("page"===b||"route"===b)&&c===d.length-1?a:a+"/"+b:a,"")).startsWith("/")?f:"/"+f,incrementalCache:b.incrementalCache||globalThis.__incrementalCache,cacheLifeProfiles:b.cacheLifeProfiles,isRevalidate:b.isRevalidate,isBuildTimePrerendering:b.nextExport,hasReadableErrorStacks:b.hasReadableErrorStacks,fetchCache:b.fetchCache,isOnDemandRevalidate:b.isOnDemandRevalidate,isDraftMode:b.isDraftMode,isPrefetchRequest:c,buildId:d,reactLoadableManifest:(null==b?void 0:b.reactLoadableManifest)||{},assetPrefix:(null==b?void 0:b.assetPrefix)||"",afterContext:function(a){let{waitUntil:b,onClose:c,onAfterTaskError:d}=a;return new a5({waitUntil:b,onClose:c,onTaskError:d})}(b),cacheComponentsEnabled:b.experimental.cacheComponents,dev:h,previouslyRevalidatedTags:e,refreshTagsByCacheKind:function(){let a=new Map,b=aY();if(b)for(let[c,d]of b)"refreshTags"in d&&a.set(c,a7(async()=>d.refreshTags()));return a}(),runInCleanSnapshot:a3?a3.snapshot():function(a,...b){return a(...b)},shouldTrackFetchMetrics:i};return b.store=j,j}({page:"/",renderOpts:{cacheLifeProfiles:null==(f=a.request.nextConfig)||null==(d=f.experimental)?void 0:d.cacheLife,experimental:{isRoutePPREnabled:!1,cacheComponents:!1,authInterrupts:!!(null==(i=a.request.nextConfig)||null==(g=i.experimental)?void 0:g.authInterrupts)},supportsDynamicResponse:!0,waitUntil:b,onClose:c.onClose.bind(c),onAfterTaskError:void 0},isPrefetchRequest:"1"===o.headers.get(U),buildId:h??"",previouslyRevalidatedTags:[]});return await ab.run(p,()=>aO.run(n,a.handler,o,q))}finally{setTimeout(()=>{c.dispatchClose()},0)}})}return a.handler(o,q)}))&&!(d instanceof Response))throw Object.defineProperty(TypeError("Expected an instance of Response to be returned"),"__NEXT_ERROR_CODE",{value:"E567",enumerable:!1,configurable:!0});d&&e&&d.headers.set("set-cookie",e);let r=null==d?void 0:d.headers.get("x-middleware-rewrite");if(d&&r&&(k||!f)){let b=new K(r,{forceLocale:!0,headers:a.request.headers,nextConfig:a.request.nextConfig});f||b.host!==o.nextUrl.host||(b.buildId=h||b.buildId,d.headers.set("x-middleware-rewrite",String(b)));let{url:c,isRelative:e}=T(b.toString(),g.toString());!f&&j&&d.headers.set("x-nextjs-rewrite",c),k&&e&&(g.pathname!==b.pathname&&d.headers.set("x-nextjs-rewritten-path",b.pathname),g.search!==b.search&&d.headers.set("x-nextjs-rewritten-query",b.search.slice(1)))}if(d&&r&&k&&n){let a=new URL(r);a.searchParams.has(W)||(a.searchParams.set(W,n),d.headers.set("x-middleware-rewrite",a.toString()))}let s=null==d?void 0:d.headers.get("Location");if(d&&s&&!f){let b=new K(s,{forceLocale:!1,headers:a.request.headers,nextConfig:a.request.nextConfig});d=new Response(d.body,d),b.host===g.host&&(b.buildId=h||b.buildId,d.headers.set("Location",b.toString())),j&&(d.headers.delete("Location"),d.headers.set("x-nextjs-redirect",T(b.toString(),g.toString()).url))}let t=d||S.next(),u=t.headers.get("x-middleware-override-headers"),v=[];if(u){for(let[a,b]of m)t.headers.set(`x-middleware-request-${a}`,b),v.push(a);v.length>0&&t.headers.set("x-middleware-override-headers",u+","+v.join(","))}return{response:t,waitUntil:("internal"===q[x].kind?Promise.all(q[x].promises).then(()=>{}):void 0)??Promise.resolve(),fetchMetrics:o.fetchMetrics}}c(449),"undefined"==typeof URLPattern||URLPattern;var bh=c(814);if(new WeakMap,bh.unstable_postpone,!1===function(a){return a.includes("needs to bail out of prerendering at this point because it used")&&a.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}("Route %%% needs to bail out of prerendering at this point because it used ^^^. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error"))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(\\))[\\s\\S])*?\\n\\s+at __next_root_layout_boundary__ \\([^\\n]*\\)`),RegExp(`\\n\\s+at __next_metadata_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_viewport_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_outlet_boundary__[\\n\\s]`),aa();let{env:bi,stdout:bj}=(null==(e=globalThis)?void 0:e.process)??{},bk=bi&&!bi.NO_COLOR&&(bi.FORCE_COLOR||(null==bj?void 0:bj.isTTY)&&!bi.CI&&"dumb"!==bi.TERM),bl=(a,b,c,d)=>{let e=a.substring(0,d)+c,f=a.substring(d+b.length),g=f.indexOf(b);return~g?e+bl(f,b,c,g):e+f},bm=(a,b,c=a)=>bk?d=>{let e=""+d,f=e.indexOf(b,a.length);return~f?a+bl(e,b,c,f)+b:a+e+b}:String,bn=bm("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m");bm("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),bm("\x1b[3m","\x1b[23m"),bm("\x1b[4m","\x1b[24m"),bm("\x1b[7m","\x1b[27m"),bm("\x1b[8m","\x1b[28m"),bm("\x1b[9m","\x1b[29m"),bm("\x1b[30m","\x1b[39m");let bo=bm("\x1b[31m","\x1b[39m"),bp=bm("\x1b[32m","\x1b[39m"),bq=bm("\x1b[33m","\x1b[39m");bm("\x1b[34m","\x1b[39m");let br=bm("\x1b[35m","\x1b[39m");bm("\x1b[38;2;173;127;168m","\x1b[39m"),bm("\x1b[36m","\x1b[39m");let bs=bm("\x1b[37m","\x1b[39m");bm("\x1b[90m","\x1b[39m"),bm("\x1b[40m","\x1b[49m"),bm("\x1b[41m","\x1b[49m"),bm("\x1b[42m","\x1b[49m"),bm("\x1b[43m","\x1b[49m"),bm("\x1b[44m","\x1b[49m"),bm("\x1b[45m","\x1b[49m"),bm("\x1b[46m","\x1b[49m"),bm("\x1b[47m","\x1b[49m"),bs(bn("○")),bo(bn("⨯")),bq(bn("⚠")),bs(bn(" ")),bp(bn("✓")),br(bn("\xbb")),new aU(1e4,a=>a.length),new WeakMap;let bt=new Map;function bu(a){let{pathname:b}=a.nextUrl;if(!b.startsWith("/api/"))return S.next();let c=a.headers.get("x-forwarded-for")?.split(",")[0]?.trim()||a.headers.get("x-real-ip")||"127.0.0.1";if(!(process.env.REDIS_URL&&"false"!==process.env.COSMIC_REDIS_ENABLED)){let a=function(a,b=100,c=6e4){let d=Date.now();bt.has(a)||bt.set(a,[]);let e=bt.get(a).filter(a=>d-a{try{return await bx(...a)}catch(e){let b=a[0],c=new URL(b.url),d=c.pathname+c.search;throw await j(e,{path:d,method:b.method,headers:Object.fromEntries(b.headers.entries())},{routerKind:"Pages Router",routePath:"/middleware",routeType:"middleware",revalidateReason:void 0}),e}}})}},213:a=>{(()=>{"use strict";var b={993:a=>{var b=Object.prototype.hasOwnProperty,c="~";function d(){}function e(a,b,c){this.fn=a,this.context=b,this.once=c||!1}function f(a,b,d,f,g){if("function"!=typeof d)throw TypeError("The listener must be a function");var h=new e(d,f||a,g),i=c?c+b:b;return a._events[i]?a._events[i].fn?a._events[i]=[a._events[i],h]:a._events[i].push(h):(a._events[i]=h,a._eventsCount++),a}function g(a,b){0==--a._eventsCount?a._events=new d:delete a._events[b]}function h(){this._events=new d,this._eventsCount=0}Object.create&&(d.prototype=Object.create(null),(new d).__proto__||(c=!1)),h.prototype.eventNames=function(){var a,d,e=[];if(0===this._eventsCount)return e;for(d in a=this._events)b.call(a,d)&&e.push(c?d.slice(1):d);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(a)):e},h.prototype.listeners=function(a){var b=c?c+a:a,d=this._events[b];if(!d)return[];if(d.fn)return[d.fn];for(var e=0,f=d.length,g=Array(f);e{a.exports=(a,b)=>(b=b||(()=>{}),a.then(a=>new Promise(a=>{a(b())}).then(()=>a),a=>new Promise(a=>{a(b())}).then(()=>{throw a})))},574:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a,b,c){let d=0,e=a.length;for(;e>0;){let f=e/2|0,g=d+f;0>=c(a[g],b)?(d=++g,e-=f+1):e=f}return d}},821:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0});let d=c(574);class e{constructor(){this._queue=[]}enqueue(a,b){let c={priority:(b=Object.assign({priority:0},b)).priority,run:a};if(this.size&&this._queue[this.size-1].priority>=b.priority)return void this._queue.push(c);let e=d.default(this._queue,c,(a,b)=>b.priority-a.priority);this._queue.splice(e,0,c)}dequeue(){let a=this._queue.shift();return null==a?void 0:a.run}filter(a){return this._queue.filter(b=>b.priority===a.priority).map(a=>a.run)}get size(){return this._queue.length}}b.default=e},816:(a,b,c)=>{let d=c(213);class e extends Error{constructor(a){super(a),this.name="TimeoutError"}}let f=(a,b,c)=>new Promise((f,g)=>{if("number"!=typeof b||b<0)throw TypeError("Expected `milliseconds` to be a positive number");if(b===1/0)return void f(a);let h=setTimeout(()=>{if("function"==typeof c){try{f(c())}catch(a){g(a)}return}let d="string"==typeof c?c:`Promise timed out after ${b} milliseconds`,h=c instanceof Error?c:new e(d);"function"==typeof a.cancel&&a.cancel(),g(h)},b);d(a.then(f,g),()=>{clearTimeout(h)})});a.exports=f,a.exports.default=f,a.exports.TimeoutError=e}},c={};function d(a){var e=c[a];if(void 0!==e)return e.exports;var f=c[a]={exports:{}},g=!0;try{b[a](f,f.exports,d),g=!1}finally{g&&delete c[a]}return f.exports}d.ab="//";var e={};(()=>{Object.defineProperty(e,"__esModule",{value:!0});let a=d(993),b=d(816),c=d(821),f=()=>{},g=new b.TimeoutError;class h extends a{constructor(a){var b,d,e,g;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=f,this._resolveIdle=f,!("number"==typeof(a=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:c.default},a)).intervalCap&&a.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!=(d=null==(b=a.intervalCap)?void 0:b.toString())?d:""}\` (${typeof a.intervalCap})`);if(void 0===a.interval||!(Number.isFinite(a.interval)&&a.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!=(g=null==(e=a.interval)?void 0:e.toString())?g:""}\` (${typeof a.interval})`);this._carryoverConcurrencyCount=a.carryoverConcurrencyCount,this._isIntervalIgnored=a.intervalCap===1/0||0===a.interval,this._intervalCap=a.intervalCap,this._interval=a.interval,this._queue=new a.queueClass,this._queueClass=a.queueClass,this.concurrency=a.concurrency,this._timeout=a.timeout,this._throwOnTimeout=!0===a.throwOnTimeout,this._isPaused=!1===a.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()},b)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let a=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let b=this._queue.dequeue();return!!b&&(this.emit("active"),b(),a&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(a){if(!("number"==typeof a&&a>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${a}\` (${typeof a})`);this._concurrency=a,this._processQueue()}async add(a,c={}){return new Promise((d,e)=>{let f=async()=>{this._pendingCount++,this._intervalCount++;try{let f=void 0===this._timeout&&void 0===c.timeout?a():b.default(Promise.resolve(a()),void 0===c.timeout?this._timeout:c.timeout,()=>{(void 0===c.throwOnTimeout?this._throwOnTimeout:c.throwOnTimeout)&&e(g)});d(await f)}catch(a){e(a)}this._next()};this._queue.enqueue(f,c),this._tryToStartAnother(),this.emit("add")})}async addAll(a,b){return Promise.all(a.map(async a=>this.add(a,b)))}start(){return this._isPaused&&(this._isPaused=!1,this._processQueue()),this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise(a=>{let b=this._resolveEmpty;this._resolveEmpty=()=>{b(),a()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(a=>{let b=this._resolveIdle;this._resolveIdle=()=>{b(),a()}})}get size(){return this._queue.size}sizeBy(a){return this._queue.filter(a).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(a){this._timeout=a}}e.default=h})(),a.exports=e})()},356:a=>{"use strict";a.exports=require("node:buffer")},392:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getTestReqInfo:function(){return g},withRequest:function(){return f}});let d=new(c(521)).AsyncLocalStorage;function e(a,b){let c=b.header(a,"next-test-proxy-port");if(!c)return;let d=b.url(a);return{url:d,proxyPort:Number(c),testData:b.header(a,"next-test-data")||""}}function f(a,b,c){let f=e(a,b);return f?d.run(f,c):c()}function g(a,b){let c=d.getStore();return c||(a&&b?e(a,b):void 0)}},440:(a,b)=>{"use strict";Symbol.for("react.transitional.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator;Object.prototype.hasOwnProperty,Object.assign},443:a=>{"use strict";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,f={};function g(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function h(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function i(a){if(!a)return;let[[b,c],...d]=h(a),{domain:e,expires:f,httponly:g,maxage:i,path:l,samesite:m,secure:n,partitioned:o,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...m&&{sameSite:j.includes(q=(q=m).toLowerCase())?q:void 0},...n&&{secure:!0},...p&&{priority:k.includes(r=(r=p).toLowerCase())?r:void 0},...o&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}((a,c)=>{for(var d in c)b(a,d,{get:c[d],enumerable:!0})})(f,{RequestCookies:()=>l,ResponseCookies:()=>m,parseCookie:()=>h,parseSetCookie:()=>i,stringifyCookie:()=>g}),a.exports=((a,f,g,h)=>{if(f&&"object"==typeof f||"function"==typeof f)for(let i of d(f))e.call(a,i)||i===g||b(a,i,{get:()=>f[i],enumerable:!(h=c(f,i))||h.enumerable});return a})(b({},"__esModule",{value:!0}),f);var j=["strict","lax","none"],k=["low","medium","high"],l=class{constructor(a){this._parsed=new Map,this._headers=a;let b=a.get("cookie");if(b)for(let[a,c]of h(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>g(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>g(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},m=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;let e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(let a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){let b=i(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=g(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(g).join("; ")}}},449:(a,b,c)=>{var d;(()=>{var e={226:function(e,f){!function(g,h){"use strict";var i="function",j="undefined",k="object",l="string",m="major",n="model",o="name",p="type",q="vendor",r="version",s="architecture",t="console",u="mobile",v="tablet",w="smarttv",x="wearable",y="embedded",z="Amazon",A="Apple",B="ASUS",C="BlackBerry",D="Browser",E="Chrome",F="Firefox",G="Google",H="Huawei",I="Microsoft",J="Motorola",K="Opera",L="Samsung",M="Sharp",N="Sony",O="Xiaomi",P="Zebra",Q="Facebook",R="Chromium OS",S="Mac OS",T=function(a,b){var c={};for(var d in a)b[d]&&b[d].length%2==0?c[d]=b[d].concat(a[d]):c[d]=a[d];return c},U=function(a){for(var b={},c=0;c0?2===f.length?typeof f[1]==i?this[f[0]]=f[1].call(this,j):this[f[0]]=f[1]:3===f.length?typeof f[1]!==i||f[1].exec&&f[1].test?this[f[0]]=j?j.replace(f[1],f[2]):void 0:this[f[0]]=j?f[1].call(this,j,f[2]):void 0:4===f.length&&(this[f[0]]=j?f[3].call(this,j.replace(f[1],f[2])):h):this[f]=j||h;l+=2}},Z=function(a,b){for(var c in b)if(typeof b[c]===k&&b[c].length>0){for(var d=0;d2&&(a[n]="iPad",a[p]=v),a},this.getEngine=function(){var a={};return a[o]=h,a[r]=h,Y.call(a,d,f.engine),a},this.getOS=function(){var a={};return a[o]=h,a[r]=h,Y.call(a,d,f.os),t&&!a[o]&&e&&"Unknown"!=e.platform&&(a[o]=e.platform.replace(/chrome os/i,R).replace(/macos/i,S)),a},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return d},this.setUA=function(a){return d=typeof a===l&&a.length>350?X(a,350):a,this},this.setUA(d),this};aa.VERSION="1.0.35",aa.BROWSER=U([o,r,m]),aa.CPU=U([s]),aa.DEVICE=U([n,q,p,t,u,w,v,x,y]),aa.ENGINE=aa.OS=U([o,r]),typeof f!==j?(e.exports&&(f=e.exports=aa),f.UAParser=aa):c.amdO?void 0===(d=(function(){return aa}).call(b,c,b,a))||(a.exports=d):typeof g!==j&&(g.UAParser=aa);var ab=typeof g!==j&&(g.jQuery||g.Zepto);if(ab&&!ab.ua){var ac=new aa;ab.ua=ac.getResult(),ab.ua.get=function(){return ac.getUA()},ab.ua.set=function(a){ac.setUA(a);var b=ac.getResult();for(var c in b)ab.ua[c]=b[c]}}}("object"==typeof window?window:this)}},f={};function g(a){var b=f[a];if(void 0!==b)return b.exports;var c=f[a]={exports:{}},d=!0;try{e[a].call(c.exports,c,c.exports,g),d=!1}finally{d&&delete f[a]}return c.exports}g.ab="//",a.exports=g(226)})()},521:a=>{"use strict";a.exports=require("node:async_hooks")},663:a=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab="//");var b={};(()=>{b.parse=function(b,c){if("string"!=typeof b)throw TypeError("argument str must be a string");for(var e={},f=b.split(d),g=(c||{}).decode||a,h=0;h{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{interceptTestApis:function(){return f},wrapRequestHandler:function(){return g}});let d=c(392),e=c(165);function f(){return(0,e.interceptFetch)(c.g.fetch)}function g(a){return(b,c)=>(0,d.withRequest)(b,e.reader,()=>a(b,c))}},814:(a,b,c)=>{"use strict";a.exports=c(440)},817:(a,b,c)=>{(()=>{"use strict";var b={491:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ContextAPI=void 0;let d=c(223),e=c(172),f=c(930),g="context",h=new d.NoopContextManager;class i{constructor(){}static getInstance(){return this._instance||(this._instance=new i),this._instance}setGlobalContextManager(a){return(0,e.registerGlobal)(g,a,f.DiagAPI.instance())}active(){return this._getContextManager().active()}with(a,b,c,...d){return this._getContextManager().with(a,b,c,...d)}bind(a,b){return this._getContextManager().bind(a,b)}_getContextManager(){return(0,e.getGlobal)(g)||h}disable(){this._getContextManager().disable(),(0,e.unregisterGlobal)(g,f.DiagAPI.instance())}}b.ContextAPI=i},930:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagAPI=void 0;let d=c(56),e=c(912),f=c(957),g=c(172);class h{constructor(){function a(a){return function(...b){let c=(0,g.getGlobal)("diag");if(c)return c[a](...b)}}let b=this;b.setLogger=(a,c={logLevel:f.DiagLogLevel.INFO})=>{var d,h,i;if(a===b){let a=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return b.error(null!=(d=a.stack)?d:a.message),!1}"number"==typeof c&&(c={logLevel:c});let j=(0,g.getGlobal)("diag"),k=(0,e.createLogLevelDiagLogger)(null!=(h=c.logLevel)?h:f.DiagLogLevel.INFO,a);if(j&&!c.suppressOverrideMessage){let a=null!=(i=Error().stack)?i:"";j.warn(`Current logger will be overwritten from ${a}`),k.warn(`Current logger will overwrite one already registered from ${a}`)}return(0,g.registerGlobal)("diag",k,b,!0)},b.disable=()=>{(0,g.unregisterGlobal)("diag",b)},b.createComponentLogger=a=>new d.DiagComponentLogger(a),b.verbose=a("verbose"),b.debug=a("debug"),b.info=a("info"),b.warn=a("warn"),b.error=a("error")}static instance(){return this._instance||(this._instance=new h),this._instance}}b.DiagAPI=h},653:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.MetricsAPI=void 0;let d=c(660),e=c(172),f=c(930),g="metrics";class h{constructor(){}static getInstance(){return this._instance||(this._instance=new h),this._instance}setGlobalMeterProvider(a){return(0,e.registerGlobal)(g,a,f.DiagAPI.instance())}getMeterProvider(){return(0,e.getGlobal)(g)||d.NOOP_METER_PROVIDER}getMeter(a,b,c){return this.getMeterProvider().getMeter(a,b,c)}disable(){(0,e.unregisterGlobal)(g,f.DiagAPI.instance())}}b.MetricsAPI=h},181:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PropagationAPI=void 0;let d=c(172),e=c(874),f=c(194),g=c(277),h=c(369),i=c(930),j="propagation",k=new e.NoopTextMapPropagator;class l{constructor(){this.createBaggage=h.createBaggage,this.getBaggage=g.getBaggage,this.getActiveBaggage=g.getActiveBaggage,this.setBaggage=g.setBaggage,this.deleteBaggage=g.deleteBaggage}static getInstance(){return this._instance||(this._instance=new l),this._instance}setGlobalPropagator(a){return(0,d.registerGlobal)(j,a,i.DiagAPI.instance())}inject(a,b,c=f.defaultTextMapSetter){return this._getGlobalPropagator().inject(a,b,c)}extract(a,b,c=f.defaultTextMapGetter){return this._getGlobalPropagator().extract(a,b,c)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,d.unregisterGlobal)(j,i.DiagAPI.instance())}_getGlobalPropagator(){return(0,d.getGlobal)(j)||k}}b.PropagationAPI=l},997:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TraceAPI=void 0;let d=c(172),e=c(846),f=c(139),g=c(607),h=c(930),i="trace";class j{constructor(){this._proxyTracerProvider=new e.ProxyTracerProvider,this.wrapSpanContext=f.wrapSpanContext,this.isSpanContextValid=f.isSpanContextValid,this.deleteSpan=g.deleteSpan,this.getSpan=g.getSpan,this.getActiveSpan=g.getActiveSpan,this.getSpanContext=g.getSpanContext,this.setSpan=g.setSpan,this.setSpanContext=g.setSpanContext}static getInstance(){return this._instance||(this._instance=new j),this._instance}setGlobalTracerProvider(a){let b=(0,d.registerGlobal)(i,this._proxyTracerProvider,h.DiagAPI.instance());return b&&this._proxyTracerProvider.setDelegate(a),b}getTracerProvider(){return(0,d.getGlobal)(i)||this._proxyTracerProvider}getTracer(a,b){return this.getTracerProvider().getTracer(a,b)}disable(){(0,d.unregisterGlobal)(i,h.DiagAPI.instance()),this._proxyTracerProvider=new e.ProxyTracerProvider}}b.TraceAPI=j},277:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.deleteBaggage=b.setBaggage=b.getActiveBaggage=b.getBaggage=void 0;let d=c(491),e=(0,c(780).createContextKey)("OpenTelemetry Baggage Key");function f(a){return a.getValue(e)||void 0}b.getBaggage=f,b.getActiveBaggage=function(){return f(d.ContextAPI.getInstance().active())},b.setBaggage=function(a,b){return a.setValue(e,b)},b.deleteBaggage=function(a){return a.deleteValue(e)}},993:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.BaggageImpl=void 0;class c{constructor(a){this._entries=a?new Map(a):new Map}getEntry(a){let b=this._entries.get(a);if(b)return Object.assign({},b)}getAllEntries(){return Array.from(this._entries.entries()).map(([a,b])=>[a,b])}setEntry(a,b){let d=new c(this._entries);return d._entries.set(a,b),d}removeEntry(a){let b=new c(this._entries);return b._entries.delete(a),b}removeEntries(...a){let b=new c(this._entries);for(let c of a)b._entries.delete(c);return b}clear(){return new c}}b.BaggageImpl=c},830:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.baggageEntryMetadataSymbol=void 0,b.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.baggageEntryMetadataFromString=b.createBaggage=void 0;let d=c(930),e=c(993),f=c(830),g=d.DiagAPI.instance();b.createBaggage=function(a={}){return new e.BaggageImpl(new Map(Object.entries(a)))},b.baggageEntryMetadataFromString=function(a){return"string"!=typeof a&&(g.error(`Cannot create baggage metadata from unknown type: ${typeof a}`),a=""),{__TYPE__:f.baggageEntryMetadataSymbol,toString:()=>a}}},67:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.context=void 0,b.context=c(491).ContextAPI.getInstance()},223:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopContextManager=void 0;let d=c(780);class e{active(){return d.ROOT_CONTEXT}with(a,b,c,...d){return b.call(c,...d)}bind(a,b){return b}enable(){return this}disable(){return this}}b.NoopContextManager=e},780:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ROOT_CONTEXT=b.createContextKey=void 0,b.createContextKey=function(a){return Symbol.for(a)};class c{constructor(a){let b=this;b._currentContext=a?new Map(a):new Map,b.getValue=a=>b._currentContext.get(a),b.setValue=(a,d)=>{let e=new c(b._currentContext);return e._currentContext.set(a,d),e},b.deleteValue=a=>{let d=new c(b._currentContext);return d._currentContext.delete(a),d}}}b.ROOT_CONTEXT=new c},506:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.diag=void 0,b.diag=c(930).DiagAPI.instance()},56:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagComponentLogger=void 0;let d=c(172);class e{constructor(a){this._namespace=a.namespace||"DiagComponentLogger"}debug(...a){return f("debug",this._namespace,a)}error(...a){return f("error",this._namespace,a)}info(...a){return f("info",this._namespace,a)}warn(...a){return f("warn",this._namespace,a)}verbose(...a){return f("verbose",this._namespace,a)}}function f(a,b,c){let e=(0,d.getGlobal)("diag");if(e)return c.unshift(b),e[a](...c)}b.DiagComponentLogger=e},972:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagConsoleLogger=void 0;let c=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class d{constructor(){for(let a=0;a{Object.defineProperty(b,"__esModule",{value:!0}),b.createLogLevelDiagLogger=void 0;let d=c(957);b.createLogLevelDiagLogger=function(a,b){function c(c,d){let e=b[c];return"function"==typeof e&&a>=d?e.bind(b):function(){}}return ad.DiagLogLevel.ALL&&(a=d.DiagLogLevel.ALL),b=b||{},{error:c("error",d.DiagLogLevel.ERROR),warn:c("warn",d.DiagLogLevel.WARN),info:c("info",d.DiagLogLevel.INFO),debug:c("debug",d.DiagLogLevel.DEBUG),verbose:c("verbose",d.DiagLogLevel.VERBOSE)}}},957:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagLogLevel=void 0,function(a){a[a.NONE=0]="NONE",a[a.ERROR=30]="ERROR",a[a.WARN=50]="WARN",a[a.INFO=60]="INFO",a[a.DEBUG=70]="DEBUG",a[a.VERBOSE=80]="VERBOSE",a[a.ALL=9999]="ALL"}(b.DiagLogLevel||(b.DiagLogLevel={}))},172:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.unregisterGlobal=b.getGlobal=b.registerGlobal=void 0;let d=c(200),e=c(521),f=c(130),g=e.VERSION.split(".")[0],h=Symbol.for(`opentelemetry.js.api.${g}`),i=d._globalThis;b.registerGlobal=function(a,b,c,d=!1){var f;let g=i[h]=null!=(f=i[h])?f:{version:e.VERSION};if(!d&&g[a]){let b=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${a}`);return c.error(b.stack||b.message),!1}if(g.version!==e.VERSION){let b=Error(`@opentelemetry/api: Registration of version v${g.version} for ${a} does not match previously registered API v${e.VERSION}`);return c.error(b.stack||b.message),!1}return g[a]=b,c.debug(`@opentelemetry/api: Registered a global for ${a} v${e.VERSION}.`),!0},b.getGlobal=function(a){var b,c;let d=null==(b=i[h])?void 0:b.version;if(d&&(0,f.isCompatible)(d))return null==(c=i[h])?void 0:c[a]},b.unregisterGlobal=function(a,b){b.debug(`@opentelemetry/api: Unregistering a global for ${a} v${e.VERSION}.`);let c=i[h];c&&delete c[a]}},130:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.isCompatible=b._makeCompatibilityCheck=void 0;let d=c(521),e=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function f(a){let b=new Set([a]),c=new Set,d=a.match(e);if(!d)return()=>!1;let f={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};if(null!=f.prerelease)return function(b){return b===a};function g(a){return c.add(a),!1}return function(a){if(b.has(a))return!0;if(c.has(a))return!1;let d=a.match(e);if(!d)return g(a);let h={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};if(null!=h.prerelease||f.major!==h.major)return g(a);if(0===f.major)return f.minor===h.minor&&f.patch<=h.patch?(b.add(a),!0):g(a);return f.minor<=h.minor?(b.add(a),!0):g(a)}}b._makeCompatibilityCheck=f,b.isCompatible=f(d.VERSION)},886:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.metrics=void 0,b.metrics=c(653).MetricsAPI.getInstance()},901:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ValueType=void 0,function(a){a[a.INT=0]="INT",a[a.DOUBLE=1]="DOUBLE"}(b.ValueType||(b.ValueType={}))},102:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.createNoopMeter=b.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=b.NOOP_OBSERVABLE_GAUGE_METRIC=b.NOOP_OBSERVABLE_COUNTER_METRIC=b.NOOP_UP_DOWN_COUNTER_METRIC=b.NOOP_HISTOGRAM_METRIC=b.NOOP_COUNTER_METRIC=b.NOOP_METER=b.NoopObservableUpDownCounterMetric=b.NoopObservableGaugeMetric=b.NoopObservableCounterMetric=b.NoopObservableMetric=b.NoopHistogramMetric=b.NoopUpDownCounterMetric=b.NoopCounterMetric=b.NoopMetric=b.NoopMeter=void 0;class c{constructor(){}createHistogram(a,c){return b.NOOP_HISTOGRAM_METRIC}createCounter(a,c){return b.NOOP_COUNTER_METRIC}createUpDownCounter(a,c){return b.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(a,c){return b.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(a,c){return b.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(a,c){return b.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(a,b){}removeBatchObservableCallback(a){}}b.NoopMeter=c;class d{}b.NoopMetric=d;class e extends d{add(a,b){}}b.NoopCounterMetric=e;class f extends d{add(a,b){}}b.NoopUpDownCounterMetric=f;class g extends d{record(a,b){}}b.NoopHistogramMetric=g;class h{addCallback(a){}removeCallback(a){}}b.NoopObservableMetric=h;class i extends h{}b.NoopObservableCounterMetric=i;class j extends h{}b.NoopObservableGaugeMetric=j;class k extends h{}b.NoopObservableUpDownCounterMetric=k,b.NOOP_METER=new c,b.NOOP_COUNTER_METRIC=new e,b.NOOP_HISTOGRAM_METRIC=new g,b.NOOP_UP_DOWN_COUNTER_METRIC=new f,b.NOOP_OBSERVABLE_COUNTER_METRIC=new i,b.NOOP_OBSERVABLE_GAUGE_METRIC=new j,b.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new k,b.createNoopMeter=function(){return b.NOOP_METER}},660:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NOOP_METER_PROVIDER=b.NoopMeterProvider=void 0;let d=c(102);class e{getMeter(a,b,c){return d.NOOP_METER}}b.NoopMeterProvider=e,b.NOOP_METER_PROVIDER=new e},200:function(a,b,c){var d=this&&this.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c),Object.defineProperty(a,d,{enumerable:!0,get:function(){return b[c]}})}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),e=this&&this.__exportStar||function(a,b){for(var c in a)"default"===c||Object.prototype.hasOwnProperty.call(b,c)||d(b,a,c)};Object.defineProperty(b,"__esModule",{value:!0}),e(c(46),b)},651:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b._globalThis=void 0,b._globalThis="object"==typeof globalThis?globalThis:c.g},46:function(a,b,c){var d=this&&this.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c),Object.defineProperty(a,d,{enumerable:!0,get:function(){return b[c]}})}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),e=this&&this.__exportStar||function(a,b){for(var c in a)"default"===c||Object.prototype.hasOwnProperty.call(b,c)||d(b,a,c)};Object.defineProperty(b,"__esModule",{value:!0}),e(c(651),b)},939:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.propagation=void 0,b.propagation=c(181).PropagationAPI.getInstance()},874:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopTextMapPropagator=void 0;class c{inject(a,b){}extract(a,b){return a}fields(){return[]}}b.NoopTextMapPropagator=c},194:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.defaultTextMapSetter=b.defaultTextMapGetter=void 0,b.defaultTextMapGetter={get(a,b){if(null!=a)return a[b]},keys:a=>null==a?[]:Object.keys(a)},b.defaultTextMapSetter={set(a,b,c){null!=a&&(a[b]=c)}}},845:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.trace=void 0,b.trace=c(997).TraceAPI.getInstance()},403:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NonRecordingSpan=void 0;let d=c(476);class e{constructor(a=d.INVALID_SPAN_CONTEXT){this._spanContext=a}spanContext(){return this._spanContext}setAttribute(a,b){return this}setAttributes(a){return this}addEvent(a,b){return this}setStatus(a){return this}updateName(a){return this}end(a){}isRecording(){return!1}recordException(a,b){}}b.NonRecordingSpan=e},614:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopTracer=void 0;let d=c(491),e=c(607),f=c(403),g=c(139),h=d.ContextAPI.getInstance();class i{startSpan(a,b,c=h.active()){var d;if(null==b?void 0:b.root)return new f.NonRecordingSpan;let i=c&&(0,e.getSpanContext)(c);return"object"==typeof(d=i)&&"string"==typeof d.spanId&&"string"==typeof d.traceId&&"number"==typeof d.traceFlags&&(0,g.isSpanContextValid)(i)?new f.NonRecordingSpan(i):new f.NonRecordingSpan}startActiveSpan(a,b,c,d){let f,g,i;if(arguments.length<2)return;2==arguments.length?i=b:3==arguments.length?(f=b,i=c):(f=b,g=c,i=d);let j=null!=g?g:h.active(),k=this.startSpan(a,f,j),l=(0,e.setSpan)(j,k);return h.with(l,i,void 0,k)}}b.NoopTracer=i},124:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopTracerProvider=void 0;let d=c(614);class e{getTracer(a,b,c){return new d.NoopTracer}}b.NoopTracerProvider=e},125:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ProxyTracer=void 0;let d=new(c(614)).NoopTracer;class e{constructor(a,b,c,d){this._provider=a,this.name=b,this.version=c,this.options=d}startSpan(a,b,c){return this._getTracer().startSpan(a,b,c)}startActiveSpan(a,b,c,d){let e=this._getTracer();return Reflect.apply(e.startActiveSpan,e,arguments)}_getTracer(){if(this._delegate)return this._delegate;let a=this._provider.getDelegateTracer(this.name,this.version,this.options);return a?(this._delegate=a,this._delegate):d}}b.ProxyTracer=e},846:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ProxyTracerProvider=void 0;let d=c(125),e=new(c(124)).NoopTracerProvider;class f{getTracer(a,b,c){var e;return null!=(e=this.getDelegateTracer(a,b,c))?e:new d.ProxyTracer(this,a,b,c)}getDelegate(){var a;return null!=(a=this._delegate)?a:e}setDelegate(a){this._delegate=a}getDelegateTracer(a,b,c){var d;return null==(d=this._delegate)?void 0:d.getTracer(a,b,c)}}b.ProxyTracerProvider=f},996:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.SamplingDecision=void 0,function(a){a[a.NOT_RECORD=0]="NOT_RECORD",a[a.RECORD=1]="RECORD",a[a.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(b.SamplingDecision||(b.SamplingDecision={}))},607:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.getSpanContext=b.setSpanContext=b.deleteSpan=b.setSpan=b.getActiveSpan=b.getSpan=void 0;let d=c(780),e=c(403),f=c(491),g=(0,d.createContextKey)("OpenTelemetry Context Key SPAN");function h(a){return a.getValue(g)||void 0}function i(a,b){return a.setValue(g,b)}b.getSpan=h,b.getActiveSpan=function(){return h(f.ContextAPI.getInstance().active())},b.setSpan=i,b.deleteSpan=function(a){return a.deleteValue(g)},b.setSpanContext=function(a,b){return i(a,new e.NonRecordingSpan(b))},b.getSpanContext=function(a){var b;return null==(b=h(a))?void 0:b.spanContext()}},325:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TraceStateImpl=void 0;let d=c(564);class e{constructor(a){this._internalState=new Map,a&&this._parse(a)}set(a,b){let c=this._clone();return c._internalState.has(a)&&c._internalState.delete(a),c._internalState.set(a,b),c}unset(a){let b=this._clone();return b._internalState.delete(a),b}get(a){return this._internalState.get(a)}serialize(){return this._keys().reduce((a,b)=>(a.push(b+"="+this.get(b)),a),[]).join(",")}_parse(a){!(a.length>512)&&(this._internalState=a.split(",").reverse().reduce((a,b)=>{let c=b.trim(),e=c.indexOf("=");if(-1!==e){let f=c.slice(0,e),g=c.slice(e+1,b.length);(0,d.validateKey)(f)&&(0,d.validateValue)(g)&&a.set(f,g)}return a},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let a=new e;return a._internalState=new Map(this._internalState),a}}b.TraceStateImpl=e},564:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.validateValue=b.validateKey=void 0;let c="[_0-9a-z-*/]",d=`[a-z]${c}{0,255}`,e=`[a-z0-9]${c}{0,240}@[a-z]${c}{0,13}`,f=RegExp(`^(?:${d}|${e})$`),g=/^[ -~]{0,255}[!-~]$/,h=/,|=/;b.validateKey=function(a){return f.test(a)},b.validateValue=function(a){return g.test(a)&&!h.test(a)}},98:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.createTraceState=void 0;let d=c(325);b.createTraceState=function(a){return new d.TraceStateImpl(a)}},476:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.INVALID_SPAN_CONTEXT=b.INVALID_TRACEID=b.INVALID_SPANID=void 0;let d=c(475);b.INVALID_SPANID="0000000000000000",b.INVALID_TRACEID="00000000000000000000000000000000",b.INVALID_SPAN_CONTEXT={traceId:b.INVALID_TRACEID,spanId:b.INVALID_SPANID,traceFlags:d.TraceFlags.NONE}},357:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.SpanKind=void 0,function(a){a[a.INTERNAL=0]="INTERNAL",a[a.SERVER=1]="SERVER",a[a.CLIENT=2]="CLIENT",a[a.PRODUCER=3]="PRODUCER",a[a.CONSUMER=4]="CONSUMER"}(b.SpanKind||(b.SpanKind={}))},139:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.wrapSpanContext=b.isSpanContextValid=b.isValidSpanId=b.isValidTraceId=void 0;let d=c(476),e=c(403),f=/^([0-9a-f]{32})$/i,g=/^[0-9a-f]{16}$/i;function h(a){return f.test(a)&&a!==d.INVALID_TRACEID}function i(a){return g.test(a)&&a!==d.INVALID_SPANID}b.isValidTraceId=h,b.isValidSpanId=i,b.isSpanContextValid=function(a){return h(a.traceId)&&i(a.spanId)},b.wrapSpanContext=function(a){return new e.NonRecordingSpan(a)}},847:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.SpanStatusCode=void 0,function(a){a[a.UNSET=0]="UNSET",a[a.OK=1]="OK",a[a.ERROR=2]="ERROR"}(b.SpanStatusCode||(b.SpanStatusCode={}))},475:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TraceFlags=void 0,function(a){a[a.NONE=0]="NONE",a[a.SAMPLED=1]="SAMPLED"}(b.TraceFlags||(b.TraceFlags={}))},521:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.VERSION=void 0,b.VERSION="1.6.0"}},d={};function e(a){var c=d[a];if(void 0!==c)return c.exports;var f=d[a]={exports:{}},g=!0;try{b[a].call(f.exports,f,f.exports,e),g=!1}finally{g&&delete d[a]}return f.exports}e.ab="//";var f={};(()=>{Object.defineProperty(f,"__esModule",{value:!0}),f.trace=f.propagation=f.metrics=f.diag=f.context=f.INVALID_SPAN_CONTEXT=f.INVALID_TRACEID=f.INVALID_SPANID=f.isValidSpanId=f.isValidTraceId=f.isSpanContextValid=f.createTraceState=f.TraceFlags=f.SpanStatusCode=f.SpanKind=f.SamplingDecision=f.ProxyTracerProvider=f.ProxyTracer=f.defaultTextMapSetter=f.defaultTextMapGetter=f.ValueType=f.createNoopMeter=f.DiagLogLevel=f.DiagConsoleLogger=f.ROOT_CONTEXT=f.createContextKey=f.baggageEntryMetadataFromString=void 0;var a=e(369);Object.defineProperty(f,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return a.baggageEntryMetadataFromString}});var b=e(780);Object.defineProperty(f,"createContextKey",{enumerable:!0,get:function(){return b.createContextKey}}),Object.defineProperty(f,"ROOT_CONTEXT",{enumerable:!0,get:function(){return b.ROOT_CONTEXT}});var c=e(972);Object.defineProperty(f,"DiagConsoleLogger",{enumerable:!0,get:function(){return c.DiagConsoleLogger}});var d=e(957);Object.defineProperty(f,"DiagLogLevel",{enumerable:!0,get:function(){return d.DiagLogLevel}});var g=e(102);Object.defineProperty(f,"createNoopMeter",{enumerable:!0,get:function(){return g.createNoopMeter}});var h=e(901);Object.defineProperty(f,"ValueType",{enumerable:!0,get:function(){return h.ValueType}});var i=e(194);Object.defineProperty(f,"defaultTextMapGetter",{enumerable:!0,get:function(){return i.defaultTextMapGetter}}),Object.defineProperty(f,"defaultTextMapSetter",{enumerable:!0,get:function(){return i.defaultTextMapSetter}});var j=e(125);Object.defineProperty(f,"ProxyTracer",{enumerable:!0,get:function(){return j.ProxyTracer}});var k=e(846);Object.defineProperty(f,"ProxyTracerProvider",{enumerable:!0,get:function(){return k.ProxyTracerProvider}});var l=e(996);Object.defineProperty(f,"SamplingDecision",{enumerable:!0,get:function(){return l.SamplingDecision}});var m=e(357);Object.defineProperty(f,"SpanKind",{enumerable:!0,get:function(){return m.SpanKind}});var n=e(847);Object.defineProperty(f,"SpanStatusCode",{enumerable:!0,get:function(){return n.SpanStatusCode}});var o=e(475);Object.defineProperty(f,"TraceFlags",{enumerable:!0,get:function(){return o.TraceFlags}});var p=e(98);Object.defineProperty(f,"createTraceState",{enumerable:!0,get:function(){return p.createTraceState}});var q=e(139);Object.defineProperty(f,"isSpanContextValid",{enumerable:!0,get:function(){return q.isSpanContextValid}}),Object.defineProperty(f,"isValidTraceId",{enumerable:!0,get:function(){return q.isValidTraceId}}),Object.defineProperty(f,"isValidSpanId",{enumerable:!0,get:function(){return q.isValidSpanId}});var r=e(476);Object.defineProperty(f,"INVALID_SPANID",{enumerable:!0,get:function(){return r.INVALID_SPANID}}),Object.defineProperty(f,"INVALID_TRACEID",{enumerable:!0,get:function(){return r.INVALID_TRACEID}}),Object.defineProperty(f,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return r.INVALID_SPAN_CONTEXT}});let s=e(67);Object.defineProperty(f,"context",{enumerable:!0,get:function(){return s.context}});let t=e(506);Object.defineProperty(f,"diag",{enumerable:!0,get:function(){return t.diag}});let u=e(886);Object.defineProperty(f,"metrics",{enumerable:!0,get:function(){return u.metrics}});let v=e(939);Object.defineProperty(f,"propagation",{enumerable:!0,get:function(){return v.propagation}});let w=e(845);Object.defineProperty(f,"trace",{enumerable:!0,get:function(){return w.trace}}),f.default={context:s.context,diag:t.diag,metrics:u.metrics,propagation:v.propagation,trace:w.trace}})(),a.exports=f})()}},a=>{var b=a(a.s=208);(_ENTRIES="undefined"==typeof _ENTRIES?{}:_ENTRIES)["middleware_src/middleware"]=b}]);src/middleware.js{"version":3,"file":"x","sources":["webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware","webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts","webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts","webpack://../../../../../src/shared/lib/router/utils/parse-path.ts","webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts","webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts","webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts","webpack://../../../../../src/shared/lib/router/utils/add-locale.ts","webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts","webpack://../../../src/shared/lib/get-hostname.ts","webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts","webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts","webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware","webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts","webpack://../../../src/client/components/app-router-headers.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middleware","webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts","webpack://../../../src/shared/lib/segment.ts","webpack://../../../../../src/shared/lib/router/utils/app-paths.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middleware","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|shared","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middleware","webpack://../../../src/shared/lib/is-thenable.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middleware","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|shared","webpack://../../../src/shared/lib/invariant-error.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware","webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts","webpack://../../../../src/server/lib/cache-handlers/default.external.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware","webpack://../../../src/client/components/hooks-server-context.ts","webpack://../../../src/client/components/static-generation-bailout.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middleware","webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts","webpack://../../../src/server/app-render/dynamic-rendering.ts","webpack://../../../src/server/request/utils.ts","webpack://../../../src/server/request/connection.ts","webpack://../../../../src/shared/lib/utils/reflect-utils.ts","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware","webpack://../../../src/server/request/root-params.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware","webpack://./src/middleware.js","webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts","webpack://../../../src/client/components/redirect-status-code.ts","webpack://../../../src/client/components/redirect-error.ts","webpack://../../../src/client/components/is-next-router-error.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middleware","external commonjs \"node:buffer\"","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware","external commonjs \"node:async_hooks\"","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/cookie/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middleware"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n handleFetch: null,\n interceptFetch: null,\n reader: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n handleFetch: function() {\n return handleFetch;\n },\n interceptFetch: function() {\n return interceptFetch;\n },\n reader: function() {\n return reader;\n }\n});\nconst _context = require(\"./context\");\nconst reader = {\n url (req) {\n return req.url;\n },\n header (req, name) {\n return req.headers.get(name);\n }\n};\nfunction getTestStack() {\n let stack = (new Error().stack ?? '').split('\\n');\n // Skip the first line and find first non-empty line.\n for(let i = 1; i < stack.length; i++){\n if (stack[i].length > 0) {\n stack = stack.slice(i);\n break;\n }\n }\n // Filter out franmework lines.\n stack = stack.filter((f)=>!f.includes('/next/dist/'));\n // At most 5 lines.\n stack = stack.slice(0, 5);\n // Cleanup some internal info and trim.\n stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim());\n return stack.join(' ');\n}\nasync function buildProxyRequest(testData, request) {\n const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request;\n return {\n testData,\n api: 'fetch',\n request: {\n url,\n method,\n headers: [\n ...Array.from(headers),\n [\n 'next-test-stack',\n getTestStack()\n ]\n ],\n body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null,\n cache,\n credentials,\n integrity,\n mode,\n redirect,\n referrer,\n referrerPolicy\n }\n };\n}\nfunction buildResponse(proxyResponse) {\n const { status, headers, body } = proxyResponse.response;\n return new Response(body ? Buffer.from(body, 'base64') : null, {\n status,\n headers: new Headers(headers)\n });\n}\nasync function handleFetch(originalFetch, request) {\n const testInfo = (0, _context.getTestReqInfo)(request, reader);\n if (!testInfo) {\n // Passthrough non-test requests.\n return originalFetch(request);\n }\n const { testData, proxyPort } = testInfo;\n const proxyRequest = await buildProxyRequest(testData, request);\n const resp = await originalFetch(`http://localhost:${proxyPort}`, {\n method: 'POST',\n body: JSON.stringify(proxyRequest),\n next: {\n // @ts-ignore\n internal: true\n }\n });\n if (!resp.ok) {\n throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), \"__NEXT_ERROR_CODE\", {\n value: \"E146\",\n enumerable: false,\n configurable: true\n });\n }\n const proxyResponse = await resp.json();\n const { api } = proxyResponse;\n switch(api){\n case 'continue':\n return originalFetch(request);\n case 'abort':\n case 'unhandled':\n throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), \"__NEXT_ERROR_CODE\", {\n value: \"E145\",\n enumerable: false,\n configurable: true\n });\n case 'fetch':\n return buildResponse(proxyResponse);\n default:\n return api;\n }\n}\nfunction interceptFetch(originalFetch) {\n global.fetch = function testFetch(input, init) {\n var _init_next;\n // Passthrough internal requests.\n // @ts-ignore\n if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) {\n return originalFetch(input, init);\n }\n return handleFetch(originalFetch, new Request(input, init));\n };\n return ()=>{\n global.fetch = originalFetch;\n };\n}\n\n//# sourceMappingURL=fetch.js.map","export async function getEdgeInstrumentationModule() {\n const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation;\n return instrumentation;\n}\nlet instrumentationModulePromise = null;\nasync function registerInstrumentation() {\n // Ensure registerInstrumentation is not called in production build\n if (process.env.NEXT_PHASE === 'phase-production-build') return;\n if (!instrumentationModulePromise) {\n instrumentationModulePromise = getEdgeInstrumentationModule();\n }\n const instrumentation = await instrumentationModulePromise;\n if (instrumentation == null ? void 0 : instrumentation.register) {\n try {\n await instrumentation.register();\n } catch (err) {\n err.message = `An error occurred while loading instrumentation hook: ${err.message}`;\n throw err;\n }\n }\n}\nexport async function edgeInstrumentationOnRequestError(...args) {\n const instrumentation = await getEdgeInstrumentationModule();\n try {\n var _instrumentation_onRequestError;\n await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args));\n } catch (err) {\n // Log the soft error and continue, since the original error has already been thrown\n console.error('Error in instrumentation.onRequestError:', err);\n }\n}\nlet registerInstrumentationPromise = null;\nexport function ensureInstrumentationRegistered() {\n if (!registerInstrumentationPromise) {\n registerInstrumentationPromise = registerInstrumentation();\n }\n return registerInstrumentationPromise;\n}\nfunction getUnsupportedModuleErrorMessage(module) {\n // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found\n return `The edge runtime does not support Node.js '${module}' module.\nLearn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;\n}\nfunction __import_unsupported(moduleName) {\n const proxy = new Proxy(function() {}, {\n get (_obj, prop) {\n if (prop === 'then') {\n return {};\n }\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n },\n construct () {\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n },\n apply (_target, _this, args) {\n if (typeof args[0] === 'function') {\n return args[0](proxy);\n }\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n });\n return new Proxy({}, {\n get: ()=>proxy\n });\n}\nfunction enhanceGlobals() {\n if (process.env.NEXT_RUNTIME !== 'edge') {\n return;\n }\n // The condition is true when the \"process\" module is provided\n if (process !== global.process) {\n // prefer local process but global.process has correct \"env\"\n process.env = global.process.env;\n global.process = process;\n }\n // to allow building code that import but does not use node.js modules,\n // webpack will expect this function to exist in global scope\n try {\n Object.defineProperty(globalThis, '__import_unsupported', {\n value: __import_unsupported,\n enumerable: false,\n configurable: false\n });\n } catch {}\n // Eagerly fire instrumentation hook to make the startup faster.\n void ensureInstrumentationRegistered();\n}\nenhanceGlobals();\n\n//# sourceMappingURL=globals.js.map","export class PageSignatureError extends Error {\n constructor({ page }){\n super(`The middleware \"${page}\" accepts an async API directly with the form:\n \n export function middleware(request, event) {\n return NextResponse.redirect('/new-location')\n }\n \n Read more: https://nextjs.org/docs/messages/middleware-new-signature\n `);\n }\n}\nexport class RemovedPageError extends Error {\n constructor(){\n super(`The request.page has been deprecated in favour of \\`URLPattern\\`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n `);\n }\n}\nexport class RemovedUAError extends Error {\n constructor(){\n super(`The request.ua has been removed in favour of \\`userAgent\\` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n `);\n }\n}\n\n//# sourceMappingURL=error.js.map","export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain';\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8';\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8';\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP';\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI';\nexport const MATCHED_PATH_HEADER = 'x-matched-path';\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate';\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated';\nexport const RSC_PREFETCH_SUFFIX = '.prefetch.rsc';\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments';\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc';\nexport const RSC_SUFFIX = '.rsc';\nexport const ACTION_SUFFIX = '.action';\nexport const NEXT_DATA_SUFFIX = '.json';\nexport const NEXT_META_SUFFIX = '.meta';\nexport const NEXT_BODY_SUFFIX = '.body';\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';\nexport const NEXT_RESUME_HEADER = 'next-resume';\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128;\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256;\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';\n// in seconds\nexport const CACHE_ONE_YEAR = 31536000;\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe;\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware';\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation';\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages';\nexport const DOT_NEXT_ALIAS = 'private-dot-next';\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir';\nexport const APP_DIR_ALIAS = 'private-next-app-dir';\nexport const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy';\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate';\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference';\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper';\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import';\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption';\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper';\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;\nexport const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?';\nexport const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?';\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\\n' + 'Please use `revalidate` instead.';\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;\nexport const ESLINT_DEFAULT_DIRS = [\n 'app',\n 'pages',\n 'components',\n 'lib',\n 'src'\n];\nexport const SERVER_RUNTIME = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs'\n};\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */ const WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */ shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */ reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */ serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */ actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */ apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */ apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */ middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */ instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */ edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */ appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */ pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */ pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */ pagesDirNode: 'pages-dir-node'\n};\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ]\n }\n};\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__'\n};\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES };\n\n//# sourceMappingURL=constants.js.map","import { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants';\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) {\n const headers = new Headers();\n for (let [key, value] of Object.entries(nodeHeaders)){\n const values = Array.isArray(value) ? value : [\n value\n ];\n for (let v of values){\n if (typeof v === 'undefined') continue;\n if (typeof v === 'number') {\n v = v.toString();\n }\n headers.append(key, v);\n }\n }\n return headers;\n}\n/*\n Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n that are within a single set-cookie field-value, such as in the Expires portion.\n This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n React Native's fetch does this for *every* header, including set-cookie.\n \n Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/ export function splitCookiesString(cookiesString) {\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while(pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))){\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== '=' && ch !== ';' && ch !== ',';\n }\n while(pos < cookiesString.length){\n start = pos;\n cookiesSeparatorFound = false;\n while(skipWhitespace()){\n ch = cookiesString.charAt(pos);\n if (ch === ',') {\n // ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while(pos < cookiesString.length && notSpecialChar()){\n pos += 1;\n }\n // currently special character\n if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n // we found cookies separator\n cookiesSeparatorFound = true;\n // pos is inside the next cookie, so back up and return it.\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n // in param ',' or param separator ';',\n // we continue from that comma\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */ export function toNodeOutgoingHttpHeaders(headers) {\n const nodeHeaders = {};\n const cookies = [];\n if (headers) {\n for (const [key, value] of headers.entries()){\n if (key.toLowerCase() === 'set-cookie') {\n // We may have gotten a comma joined string of cookies, or multiple\n // set-cookie headers. We need to merge them into one header array\n // to represent all the cookies.\n cookies.push(...splitCookiesString(value));\n nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies;\n } else {\n nodeHeaders[key] = value;\n }\n }\n }\n return nodeHeaders;\n}\n/**\n * Validate the correctness of a user-provided URL.\n */ export function validateURL(url) {\n try {\n return String(new URL(String(url)));\n } catch (error) {\n throw Object.defineProperty(new Error(`URL is malformed \"${String(url)}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {\n cause: error\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E61\",\n enumerable: false,\n configurable: true\n });\n }\n}\n/**\n * Normalizes `nxtP` and `nxtI` query param values to remove the prefix.\n * This function does not mutate the input key.\n */ export function normalizeNextQueryParam(key) {\n const prefixes = [\n NEXT_QUERY_PARAM_PREFIX,\n NEXT_INTERCEPTION_MARKER_PREFIX\n ];\n for (const prefix of prefixes){\n if (key !== prefix && key.startsWith(prefix)) {\n return key.substring(prefix.length);\n }\n }\n return null;\n}\n\n//# sourceMappingURL=utils.js.map","import { PageSignatureError } from '../error';\nconst responseSymbol = Symbol('response');\nconst passThroughSymbol = Symbol('passThrough');\nconst waitUntilSymbol = Symbol('waitUntil');\nclass FetchEvent {\n constructor(_request, waitUntil){\n this[passThroughSymbol] = false;\n this[waitUntilSymbol] = waitUntil ? {\n kind: 'external',\n function: waitUntil\n } : {\n kind: 'internal',\n promises: []\n };\n }\n // TODO: is this dead code? NextFetchEvent never lets this get called\n respondWith(response) {\n if (!this[responseSymbol]) {\n this[responseSymbol] = Promise.resolve(response);\n }\n }\n // TODO: is this dead code? passThroughSymbol is unused\n passThroughOnException() {\n this[passThroughSymbol] = true;\n }\n waitUntil(promise) {\n if (this[waitUntilSymbol].kind === 'external') {\n // if we received an external waitUntil, we delegate to it\n // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox`\n const waitUntil = this[waitUntilSymbol].function;\n return waitUntil(promise);\n } else {\n // if we didn't receive an external waitUntil, we make it work on our own\n // (and expect the caller to do something with the promises)\n this[waitUntilSymbol].promises.push(promise);\n }\n }\n}\nexport function getWaitUntilPromiseFromEvent(event) {\n return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined;\n}\nexport class NextFetchEvent extends FetchEvent {\n constructor(params){\n var _params_context;\n super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil);\n this.sourcePage = params.page;\n }\n /**\n * @deprecated The `request` is now the first parameter and the API is now async.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */ get request() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n /**\n * @deprecated Using `respondWith` is no longer needed.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */ respondWith() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n}\n\n//# sourceMappingURL=fetch-event.js.map","import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n","import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n","import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n","export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n","import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n","import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n","import { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale';\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info';\nimport { getHostname } from '../../shared/lib/get-hostname';\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info';\nconst REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\\/\\/)(127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)/;\nfunction parseURL(url, base) {\n return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'));\n}\nconst Internal = Symbol('NextURLInternal');\nexport class NextURL {\n constructor(input, baseOrOpts, opts){\n let base;\n let options;\n if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') {\n base = baseOrOpts;\n options = opts || {};\n } else {\n options = opts || baseOrOpts || {};\n }\n this[Internal] = {\n url: parseURL(input, base ?? options.base),\n options: options,\n basePath: ''\n };\n this.analyze();\n }\n analyze() {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1;\n const info = getNextPathnameInfo(this[Internal].url.pathname, {\n nextConfig: this[Internal].options.nextConfig,\n parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n i18nProvider: this[Internal].options.i18nProvider\n });\n const hostname = getHostname(this[Internal].url, this[Internal].options.headers);\n this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname);\n const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale);\n this[Internal].url.pathname = info.pathname;\n this[Internal].defaultLocale = defaultLocale;\n this[Internal].basePath = info.basePath ?? '';\n this[Internal].buildId = info.buildId;\n this[Internal].locale = info.locale ?? defaultLocale;\n this[Internal].trailingSlash = info.trailingSlash;\n }\n formatPathname() {\n return formatNextPathnameInfo({\n basePath: this[Internal].basePath,\n buildId: this[Internal].buildId,\n defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined,\n locale: this[Internal].locale,\n pathname: this[Internal].url.pathname,\n trailingSlash: this[Internal].trailingSlash\n });\n }\n formatSearch() {\n return this[Internal].url.search;\n }\n get buildId() {\n return this[Internal].buildId;\n }\n set buildId(buildId) {\n this[Internal].buildId = buildId;\n }\n get locale() {\n return this[Internal].locale ?? '';\n }\n set locale(locale) {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig;\n if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) {\n throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale \"${locale}\"`), \"__NEXT_ERROR_CODE\", {\n value: \"E597\",\n enumerable: false,\n configurable: true\n });\n }\n this[Internal].locale = locale;\n }\n get defaultLocale() {\n return this[Internal].defaultLocale;\n }\n get domainLocale() {\n return this[Internal].domainLocale;\n }\n get searchParams() {\n return this[Internal].url.searchParams;\n }\n get host() {\n return this[Internal].url.host;\n }\n set host(value) {\n this[Internal].url.host = value;\n }\n get hostname() {\n return this[Internal].url.hostname;\n }\n set hostname(value) {\n this[Internal].url.hostname = value;\n }\n get port() {\n return this[Internal].url.port;\n }\n set port(value) {\n this[Internal].url.port = value;\n }\n get protocol() {\n return this[Internal].url.protocol;\n }\n set protocol(value) {\n this[Internal].url.protocol = value;\n }\n get href() {\n const pathname = this.formatPathname();\n const search = this.formatSearch();\n return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`;\n }\n set href(url) {\n this[Internal].url = parseURL(url);\n this.analyze();\n }\n get origin() {\n return this[Internal].url.origin;\n }\n get pathname() {\n return this[Internal].url.pathname;\n }\n set pathname(value) {\n this[Internal].url.pathname = value;\n }\n get hash() {\n return this[Internal].url.hash;\n }\n set hash(value) {\n this[Internal].url.hash = value;\n }\n get search() {\n return this[Internal].url.search;\n }\n set search(value) {\n this[Internal].url.search = value;\n }\n get password() {\n return this[Internal].url.password;\n }\n set password(value) {\n this[Internal].url.password = value;\n }\n get username() {\n return this[Internal].url.username;\n }\n set username(value) {\n this[Internal].url.username = value;\n }\n get basePath() {\n return this[Internal].basePath;\n }\n set basePath(value) {\n this[Internal].basePath = value.startsWith('/') ? value : `/${value}`;\n }\n toString() {\n return this.href;\n }\n toJSON() {\n return this.href;\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n href: this.href,\n origin: this.origin,\n protocol: this.protocol,\n username: this.username,\n password: this.password,\n host: this.host,\n hostname: this.hostname,\n port: this.port,\n pathname: this.pathname,\n search: this.search,\n searchParams: this.searchParams,\n hash: this.hash\n };\n }\n clone() {\n return new NextURL(String(this), this[Internal].options);\n }\n}\n\n//# sourceMappingURL=next-url.js.map","export { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies';\n\n//# sourceMappingURL=cookies.js.map","import { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { RemovedUAError, RemovedPageError } from '../error';\nimport { RequestCookies } from './cookies';\nexport const INTERNALS = Symbol('internal request');\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */ export class NextRequest extends Request {\n constructor(input, init = {}){\n const url = typeof input !== 'string' && 'url' in input ? input.url : String(input);\n validateURL(url);\n // node Request instance requires duplex option when a body\n // is present or it errors, we don't handle this for\n // Request being passed in since it would have already\n // errored if this wasn't configured\n if (process.env.NEXT_RUNTIME !== 'edge') {\n if (init.body && init.duplex !== 'half') {\n init.duplex = 'half';\n }\n }\n if (input instanceof Request) super(input, init);\n else super(url, init);\n const nextUrl = new NextURL(url, {\n headers: toNodeOutgoingHttpHeaders(this.headers),\n nextConfig: init.nextConfig\n });\n this[INTERNALS] = {\n cookies: new RequestCookies(this.headers),\n nextUrl,\n url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString()\n };\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n nextUrl: this.nextUrl,\n url: this.url,\n // rest of props come from Request\n bodyUsed: this.bodyUsed,\n cache: this.cache,\n credentials: this.credentials,\n destination: this.destination,\n headers: Object.fromEntries(this.headers),\n integrity: this.integrity,\n keepalive: this.keepalive,\n method: this.method,\n mode: this.mode,\n redirect: this.redirect,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n signal: this.signal\n };\n }\n get cookies() {\n return this[INTERNALS].cookies;\n }\n get nextUrl() {\n return this[INTERNALS].nextUrl;\n }\n /**\n * @deprecated\n * `page` has been deprecated in favour of `URLPattern`.\n * Read more: https://nextjs.org/docs/messages/middleware-request-page\n */ get page() {\n throw new RemovedPageError();\n }\n /**\n * @deprecated\n * `ua` has been removed in favour of \\`userAgent\\` function.\n * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n */ get ua() {\n throw new RemovedUAError();\n }\n get url() {\n return this[INTERNALS].url;\n }\n}\n\n//# sourceMappingURL=request.js.map","export class ReflectAdapter {\n static get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n if (typeof value === 'function') {\n return value.bind(target);\n }\n return value;\n }\n static set(target, prop, value, receiver) {\n return Reflect.set(target, prop, value, receiver);\n }\n static has(target, prop) {\n return Reflect.has(target, prop);\n }\n static deleteProperty(target, prop) {\n return Reflect.deleteProperty(target, prop);\n }\n}\n\n//# sourceMappingURL=reflect.js.map","import { stringifyCookie } from '../../web/spec-extension/cookies';\nimport { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { ReflectAdapter } from './adapters/reflect';\nimport { ResponseCookies } from './cookies';\nconst INTERNALS = Symbol('internal response');\nconst REDIRECTS = new Set([\n 301,\n 302,\n 303,\n 307,\n 308\n]);\nfunction handleMiddlewareField(init, headers) {\n var _init_request;\n if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) {\n if (!(init.request.headers instanceof Headers)) {\n throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), \"__NEXT_ERROR_CODE\", {\n value: \"E119\",\n enumerable: false,\n configurable: true\n });\n }\n const keys = [];\n for (const [key, value] of init.request.headers){\n headers.set('x-middleware-request-' + key, value);\n keys.push(key);\n }\n headers.set('x-middleware-override-headers', keys.join(','));\n }\n}\n/**\n * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response)\n */ export class NextResponse extends Response {\n constructor(body, init = {}){\n super(body, init);\n const headers = this.headers;\n const cookies = new ResponseCookies(headers);\n const cookiesProxy = new Proxy(cookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'delete':\n case 'set':\n {\n return (...args)=>{\n const result = Reflect.apply(target[prop], target, args);\n const newHeaders = new Headers(headers);\n if (result instanceof ResponseCookies) {\n headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(','));\n }\n handleMiddlewareField(init, newHeaders);\n return result;\n };\n }\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n this[INTERNALS] = {\n cookies: cookiesProxy,\n url: init.url ? new NextURL(init.url, {\n headers: toNodeOutgoingHttpHeaders(headers),\n nextConfig: init.nextConfig\n }) : undefined\n };\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n url: this.url,\n // rest of props come from Response\n body: this.body,\n bodyUsed: this.bodyUsed,\n headers: Object.fromEntries(this.headers),\n ok: this.ok,\n redirected: this.redirected,\n status: this.status,\n statusText: this.statusText,\n type: this.type\n };\n }\n get cookies() {\n return this[INTERNALS].cookies;\n }\n static json(body, init) {\n const response = Response.json(body, init);\n return new NextResponse(response.body, response);\n }\n static redirect(url, init) {\n const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307;\n if (!REDIRECTS.has(status)) {\n throw Object.defineProperty(new RangeError('Failed to execute \"redirect\" on \"response\": Invalid status code'), \"__NEXT_ERROR_CODE\", {\n value: \"E529\",\n enumerable: false,\n configurable: true\n });\n }\n const initObj = typeof init === 'object' ? init : {};\n const headers = new Headers(initObj == null ? void 0 : initObj.headers);\n headers.set('Location', validateURL(url));\n return new NextResponse(null, {\n ...initObj,\n headers,\n status\n });\n }\n static rewrite(destination, init) {\n const headers = new Headers(init == null ? void 0 : init.headers);\n headers.set('x-middleware-rewrite', validateURL(destination));\n handleMiddlewareField(init, headers);\n return new NextResponse(null, {\n ...init,\n headers\n });\n }\n static next(init) {\n const headers = new Headers(init == null ? void 0 : init.headers);\n headers.set('x-middleware-next', '1');\n handleMiddlewareField(init, headers);\n return new NextResponse(null, {\n ...init,\n headers\n });\n }\n}\n\n//# sourceMappingURL=response.js.map","/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n","export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n","import { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers';\nconst INTERNAL_QUERY_NAMES = [\n NEXT_RSC_UNION_QUERY\n];\nexport function stripInternalQueries(query) {\n for (const name of INTERNAL_QUERY_NAMES){\n delete query[name];\n }\n}\nexport function stripInternalSearchParams(url) {\n const isStringUrl = typeof url === 'string';\n const instance = isStringUrl ? new URL(url) : url;\n instance.searchParams.delete(NEXT_RSC_UNION_QUERY);\n return isStringUrl ? instance.toString() : instance;\n}\n\n//# sourceMappingURL=internal-utils.js.map","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n","import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n","import { ReflectAdapter } from './reflect';\n/**\n * @internal\n */ export class ReadonlyHeadersError extends Error {\n constructor(){\n super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers');\n }\n static callable() {\n throw new ReadonlyHeadersError();\n }\n}\nexport class HeadersAdapter extends Headers {\n constructor(headers){\n // We've already overridden the methods that would be called, so we're just\n // calling the super constructor to ensure that the instanceof check works.\n super();\n this.headers = new Proxy(headers, {\n get (target, prop, receiver) {\n // Because this is just an object, we expect that all \"get\" operations\n // are for properties. If it's a \"get\" for a symbol, we'll just return\n // the symbol.\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(target, prop, receiver);\n }\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return;\n // If the original casing exists, return the value.\n return ReflectAdapter.get(target, original, receiver);\n },\n set (target, prop, value, receiver) {\n if (typeof prop === 'symbol') {\n return ReflectAdapter.set(target, prop, value, receiver);\n }\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, use the prop as the key.\n return ReflectAdapter.set(target, original ?? prop, value, receiver);\n },\n has (target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop);\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false;\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original);\n },\n deleteProperty (target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop);\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true;\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original);\n }\n });\n }\n /**\n * Seals a Headers instance to prevent modification by throwing an error when\n * any mutating method is called.\n */ static seal(headers) {\n return new Proxy(headers, {\n get (target, prop, receiver) {\n switch(prop){\n case 'append':\n case 'delete':\n case 'set':\n return ReadonlyHeadersError.callable;\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n }\n /**\n * Merges a header value into a string. This stores multiple values as an\n * array, so we need to merge them into a string.\n *\n * @param value a header value\n * @returns a merged header value (a string)\n */ merge(value) {\n if (Array.isArray(value)) return value.join(', ');\n return value;\n }\n /**\n * Creates a Headers instance from a plain object or a Headers instance.\n *\n * @param headers a plain object or a Headers instance\n * @returns a headers instance\n */ static from(headers) {\n if (headers instanceof Headers) return headers;\n return new HeadersAdapter(headers);\n }\n append(name, value) {\n const existing = this.headers[name];\n if (typeof existing === 'string') {\n this.headers[name] = [\n existing,\n value\n ];\n } else if (Array.isArray(existing)) {\n existing.push(value);\n } else {\n this.headers[name] = value;\n }\n }\n delete(name) {\n delete this.headers[name];\n }\n get(name) {\n const value = this.headers[name];\n if (typeof value !== 'undefined') return this.merge(value);\n return null;\n }\n has(name) {\n return typeof this.headers[name] !== 'undefined';\n }\n set(name, value) {\n this.headers[name] = value;\n }\n forEach(callbackfn, thisArg) {\n for (const [name, value] of this.entries()){\n callbackfn.call(thisArg, value, name, this);\n }\n }\n *entries() {\n for (const key of Object.keys(this.headers)){\n const name = key.toLowerCase();\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(name);\n yield [\n name,\n value\n ];\n }\n }\n *keys() {\n for (const key of Object.keys(this.headers)){\n const name = key.toLowerCase();\n yield name;\n }\n }\n *values() {\n for (const key of Object.keys(this.headers)){\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(key);\n yield value;\n }\n }\n [Symbol.iterator]() {\n return this.entries();\n }\n}\n\n//# sourceMappingURL=headers.js.map","const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), \"__NEXT_ERROR_CODE\", {\n value: \"E504\",\n enumerable: false,\n configurable: true\n});\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n static bind(fn) {\n return fn;\n }\n}\nconst maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;\nexport function createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nexport function bindSnapshot(fn) {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn);\n }\n return FakeAsyncLocalStorage.bind(fn);\n}\nexport function createSnapshot() {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot();\n }\n return function(fn, ...args) {\n return fn(...args);\n };\n}\n\n//# sourceMappingURL=async-local-storage.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const workAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=work-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { workAsyncStorageInstance } from './work-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { workAsyncStorageInstance as workAsyncStorage };\n\n//# sourceMappingURL=work-async-storage.external.js.map","import { RequestCookies } from '../cookies';\nimport { ResponseCookies } from '../cookies';\nimport { ReflectAdapter } from './reflect';\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external';\n/**\n * @internal\n */ export class ReadonlyRequestCookiesError extends Error {\n constructor(){\n super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options');\n }\n static callable() {\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport class RequestCookiesAdapter {\n static seal(cookies) {\n return new Proxy(cookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'clear':\n case 'delete':\n case 'set':\n return ReadonlyRequestCookiesError.callable;\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n }\n}\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies');\nexport function getModifiedCookieValues(cookies) {\n const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES];\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return [];\n }\n return modified;\n}\nexport function appendMutableCookies(headers, mutableCookies) {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies);\n if (modifiedCookieValues.length === 0) {\n return false;\n }\n // Return a new response that extends the response with\n // the modified cookies as fallbacks. `res` cookies\n // will still take precedence.\n const resCookies = new ResponseCookies(headers);\n const returnedCookies = resCookies.getAll();\n // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues){\n resCookies.set(cookie);\n }\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies){\n resCookies.set(cookie);\n }\n return true;\n}\nexport class MutableRequestCookiesAdapter {\n static wrap(cookies, onUpdateCookies) {\n const responseCookies = new ResponseCookies(new Headers());\n for (const cookie of cookies.getAll()){\n responseCookies.set(cookie);\n }\n let modifiedValues = [];\n const modifiedCookies = new Set();\n const updateResponseCookies = ()=>{\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore();\n if (workStore) {\n workStore.pathWasRevalidated = true;\n }\n const allCookies = responseCookies.getAll();\n modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name));\n if (onUpdateCookies) {\n const serializedCookies = [];\n for (const cookie of modifiedValues){\n const tempCookies = new ResponseCookies(new Headers());\n tempCookies.set(cookie);\n serializedCookies.push(tempCookies.toString());\n }\n onUpdateCookies(serializedCookies);\n }\n };\n const wrappedCookies = new Proxy(responseCookies, {\n get (target, prop, receiver) {\n switch(prop){\n // A special symbol to get the modified cookie values\n case SYMBOL_MODIFY_COOKIE_VALUES:\n return modifiedValues;\n // TODO: Throw error if trying to set a cookie after the response\n // headers have been set.\n case 'delete':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.delete(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n case 'set':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.set(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n }\n}\nexport function createCookiesWithMutableAccessCheck(requestStore) {\n const wrappedCookies = new Proxy(requestStore.mutableCookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'delete':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().delete');\n target.delete(...args);\n return wrappedCookies;\n };\n case 'set':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().set');\n target.set(...args);\n return wrappedCookies;\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n}\nexport function areCookiesMutableInCurrentPhase(requestStore) {\n return requestStore.phase === 'action';\n}\n/** Ensure that cookies() starts throwing on mutation\n * if we changed phases and can no longer mutate.\n *\n * This can happen when going:\n * 'render' -> 'after'\n * 'action' -> 'render'\n * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) {\n if (!areCookiesMutableInCurrentPhase(requestStore)) {\n // TODO: maybe we can give a more precise error message based on callingExpression?\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport function responseCookiesToRequestCookies(responseCookies) {\n const requestCookies = new RequestCookies(new Headers());\n for (const cookie of responseCookies.getAll()){\n requestCookies.set(cookie);\n }\n return requestCookies;\n}\n\n//# sourceMappingURL=request-cookies.js.map","/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/ // eslint typescript has a bug with TS enums\n/* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) {\n BaseServerSpan[\"handleRequest\"] = \"BaseServer.handleRequest\";\n BaseServerSpan[\"run\"] = \"BaseServer.run\";\n BaseServerSpan[\"pipe\"] = \"BaseServer.pipe\";\n BaseServerSpan[\"getStaticHTML\"] = \"BaseServer.getStaticHTML\";\n BaseServerSpan[\"render\"] = \"BaseServer.render\";\n BaseServerSpan[\"renderToResponseWithComponents\"] = \"BaseServer.renderToResponseWithComponents\";\n BaseServerSpan[\"renderToResponse\"] = \"BaseServer.renderToResponse\";\n BaseServerSpan[\"renderToHTML\"] = \"BaseServer.renderToHTML\";\n BaseServerSpan[\"renderError\"] = \"BaseServer.renderError\";\n BaseServerSpan[\"renderErrorToResponse\"] = \"BaseServer.renderErrorToResponse\";\n BaseServerSpan[\"renderErrorToHTML\"] = \"BaseServer.renderErrorToHTML\";\n BaseServerSpan[\"render404\"] = \"BaseServer.render404\";\n return BaseServerSpan;\n}(BaseServerSpan || {});\nvar LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) {\n LoadComponentsSpan[\"loadDefaultErrorComponents\"] = \"LoadComponents.loadDefaultErrorComponents\";\n LoadComponentsSpan[\"loadComponents\"] = \"LoadComponents.loadComponents\";\n return LoadComponentsSpan;\n}(LoadComponentsSpan || {});\nvar NextServerSpan = /*#__PURE__*/ function(NextServerSpan) {\n NextServerSpan[\"getRequestHandler\"] = \"NextServer.getRequestHandler\";\n NextServerSpan[\"getServer\"] = \"NextServer.getServer\";\n NextServerSpan[\"getServerRequestHandler\"] = \"NextServer.getServerRequestHandler\";\n NextServerSpan[\"createServer\"] = \"createServer.createServer\";\n return NextServerSpan;\n}(NextServerSpan || {});\nvar NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) {\n NextNodeServerSpan[\"compression\"] = \"NextNodeServer.compression\";\n NextNodeServerSpan[\"getBuildId\"] = \"NextNodeServer.getBuildId\";\n NextNodeServerSpan[\"createComponentTree\"] = \"NextNodeServer.createComponentTree\";\n NextNodeServerSpan[\"clientComponentLoading\"] = \"NextNodeServer.clientComponentLoading\";\n NextNodeServerSpan[\"getLayoutOrPageModule\"] = \"NextNodeServer.getLayoutOrPageModule\";\n NextNodeServerSpan[\"generateStaticRoutes\"] = \"NextNodeServer.generateStaticRoutes\";\n NextNodeServerSpan[\"generateFsStaticRoutes\"] = \"NextNodeServer.generateFsStaticRoutes\";\n NextNodeServerSpan[\"generatePublicRoutes\"] = \"NextNodeServer.generatePublicRoutes\";\n NextNodeServerSpan[\"generateImageRoutes\"] = \"NextNodeServer.generateImageRoutes.route\";\n NextNodeServerSpan[\"sendRenderResult\"] = \"NextNodeServer.sendRenderResult\";\n NextNodeServerSpan[\"proxyRequest\"] = \"NextNodeServer.proxyRequest\";\n NextNodeServerSpan[\"runApi\"] = \"NextNodeServer.runApi\";\n NextNodeServerSpan[\"render\"] = \"NextNodeServer.render\";\n NextNodeServerSpan[\"renderHTML\"] = \"NextNodeServer.renderHTML\";\n NextNodeServerSpan[\"imageOptimizer\"] = \"NextNodeServer.imageOptimizer\";\n NextNodeServerSpan[\"getPagePath\"] = \"NextNodeServer.getPagePath\";\n NextNodeServerSpan[\"getRoutesManifest\"] = \"NextNodeServer.getRoutesManifest\";\n NextNodeServerSpan[\"findPageComponents\"] = \"NextNodeServer.findPageComponents\";\n NextNodeServerSpan[\"getFontManifest\"] = \"NextNodeServer.getFontManifest\";\n NextNodeServerSpan[\"getServerComponentManifest\"] = \"NextNodeServer.getServerComponentManifest\";\n NextNodeServerSpan[\"getRequestHandler\"] = \"NextNodeServer.getRequestHandler\";\n NextNodeServerSpan[\"renderToHTML\"] = \"NextNodeServer.renderToHTML\";\n NextNodeServerSpan[\"renderError\"] = \"NextNodeServer.renderError\";\n NextNodeServerSpan[\"renderErrorToHTML\"] = \"NextNodeServer.renderErrorToHTML\";\n NextNodeServerSpan[\"render404\"] = \"NextNodeServer.render404\";\n NextNodeServerSpan[\"startResponse\"] = \"NextNodeServer.startResponse\";\n // nested inner span, does not require parent scope name\n NextNodeServerSpan[\"route\"] = \"route\";\n NextNodeServerSpan[\"onProxyReq\"] = \"onProxyReq\";\n NextNodeServerSpan[\"apiResolver\"] = \"apiResolver\";\n NextNodeServerSpan[\"internalFetch\"] = \"internalFetch\";\n return NextNodeServerSpan;\n}(NextNodeServerSpan || {});\nvar StartServerSpan = /*#__PURE__*/ function(StartServerSpan) {\n StartServerSpan[\"startServer\"] = \"startServer.startServer\";\n return StartServerSpan;\n}(StartServerSpan || {});\nvar RenderSpan = /*#__PURE__*/ function(RenderSpan) {\n RenderSpan[\"getServerSideProps\"] = \"Render.getServerSideProps\";\n RenderSpan[\"getStaticProps\"] = \"Render.getStaticProps\";\n RenderSpan[\"renderToString\"] = \"Render.renderToString\";\n RenderSpan[\"renderDocument\"] = \"Render.renderDocument\";\n RenderSpan[\"createBodyResult\"] = \"Render.createBodyResult\";\n return RenderSpan;\n}(RenderSpan || {});\nvar AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) {\n AppRenderSpan[\"renderToString\"] = \"AppRender.renderToString\";\n AppRenderSpan[\"renderToReadableStream\"] = \"AppRender.renderToReadableStream\";\n AppRenderSpan[\"getBodyResult\"] = \"AppRender.getBodyResult\";\n AppRenderSpan[\"fetch\"] = \"AppRender.fetch\";\n return AppRenderSpan;\n}(AppRenderSpan || {});\nvar RouterSpan = /*#__PURE__*/ function(RouterSpan) {\n RouterSpan[\"executeRoute\"] = \"Router.executeRoute\";\n return RouterSpan;\n}(RouterSpan || {});\nvar NodeSpan = /*#__PURE__*/ function(NodeSpan) {\n NodeSpan[\"runHandler\"] = \"Node.runHandler\";\n return NodeSpan;\n}(NodeSpan || {});\nvar AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) {\n AppRouteRouteHandlersSpan[\"runHandler\"] = \"AppRouteRouteHandlers.runHandler\";\n return AppRouteRouteHandlersSpan;\n}(AppRouteRouteHandlersSpan || {});\nvar ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) {\n ResolveMetadataSpan[\"generateMetadata\"] = \"ResolveMetadata.generateMetadata\";\n ResolveMetadataSpan[\"generateViewport\"] = \"ResolveMetadata.generateViewport\";\n return ResolveMetadataSpan;\n}(ResolveMetadataSpan || {});\nvar MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) {\n MiddlewareSpan[\"execute\"] = \"Middleware.execute\";\n return MiddlewareSpan;\n}(MiddlewareSpan || {});\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n \"Middleware.execute\",\n \"BaseServer.handleRequest\",\n \"Render.getServerSideProps\",\n \"Render.getStaticProps\",\n \"AppRender.fetch\",\n \"AppRender.getBodyResult\",\n \"Render.renderDocument\",\n \"Node.runHandler\",\n \"AppRouteRouteHandlers.runHandler\",\n \"ResolveMetadata.generateMetadata\",\n \"ResolveMetadata.generateViewport\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.getLayoutOrPageModule\",\n \"NextNodeServer.startResponse\",\n \"NextNodeServer.clientComponentLoading\"\n]);\n// These Spans are allowed to be always logged\n// when the otel log prefix env is set\nexport const LogSpanAllowList = new Set([\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.clientComponentLoading\"\n]);\nexport { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, };\n\n//# sourceMappingURL=constants.js.map","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants';\nimport { isThenable } from '../../../shared/lib/is-thenable';\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX;\nlet api;\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api');\n} else {\n try {\n api = require('@opentelemetry/api');\n } catch (err) {\n api = require('next/dist/compiled/@opentelemetry/api');\n }\n}\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api;\nexport class BubbledError extends Error {\n constructor(bubble, result){\n super(), this.bubble = bubble, this.result = result;\n }\n}\nexport function isBubbledError(error) {\n if (typeof error !== 'object' || error === null) return false;\n return error instanceof BubbledError;\n}\nconst closeSpanWithError = (span, error)=>{\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true);\n } else {\n if (error) {\n span.recordException(error);\n span.setAttribute('error.type', error.name);\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error == null ? void 0 : error.message\n });\n }\n span.end();\n};\n/** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map();\nconst rootSpanIdKey = api.createContextKey('next.rootSpanId');\nlet lastSpanId = 0;\nconst getSpanId = ()=>lastSpanId++;\nconst clientTraceDataSetter = {\n set (carrier, key, value) {\n carrier.push({\n key,\n value\n });\n }\n};\nclass NextTracerImpl {\n /**\n * Returns an instance to the trace with configured name.\n * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization,\n * This should be lazily evaluated.\n */ getTracerInstance() {\n return trace.getTracer('next.js', '0.0.1');\n }\n getContext() {\n return context;\n }\n getTracePropagationData() {\n const activeContext = context.active();\n const entries = [];\n propagation.inject(activeContext, entries, clientTraceDataSetter);\n return entries;\n }\n getActiveScopeSpan() {\n return trace.getSpan(context == null ? void 0 : context.active());\n }\n withPropagatedContext(carrier, fn, getter) {\n const activeContext = context.active();\n if (trace.getSpanContext(activeContext)) {\n // Active span is already set, too late to propagate.\n return fn();\n }\n const remoteContext = propagation.extract(activeContext, carrier, getter);\n return context.with(remoteContext, fn);\n }\n trace(...args) {\n var _trace_getSpanContext;\n const [type, fnOrOptions, fnOrEmpty] = args;\n // coerce options form overload\n const { fn, options } = typeof fnOrOptions === 'function' ? {\n fn: fnOrOptions,\n options: {}\n } : {\n fn: fnOrEmpty,\n options: {\n ...fnOrOptions\n }\n };\n const spanName = options.spanName ?? type;\n if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) {\n return fn();\n }\n // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it.\n let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n let isRootSpan = false;\n if (!spanContext) {\n spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT;\n isRootSpan = true;\n } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) {\n isRootSpan = true;\n }\n const spanId = getSpanId();\n options.attributes = {\n 'next.span_name': spanName,\n 'next.span_type': type,\n ...options.attributes\n };\n return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{\n let startTime;\n if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) {\n startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined;\n }\n let cleanedUp = false;\n const onCleanup = ()=>{\n if (cleanedUp) return;\n cleanedUp = true;\n rootSpanAttributesStore.delete(spanId);\n if (startTime) {\n performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, {\n start: startTime,\n end: performance.now()\n });\n }\n };\n if (isRootSpan) {\n rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {})));\n }\n if (fn.length > 1) {\n try {\n return fn(span, (err)=>closeSpanWithError(span, err));\n } catch (err) {\n closeSpanWithError(span, err);\n throw err;\n } finally{\n onCleanup();\n }\n }\n try {\n const result = fn(span);\n if (isThenable(result)) {\n // If there's error make sure it throws\n return result.then((res)=>{\n span.end();\n // Need to pass down the promise result,\n // it could be react stream response with error { error, stream }\n return res;\n }).catch((err)=>{\n closeSpanWithError(span, err);\n throw err;\n }).finally(onCleanup);\n } else {\n span.end();\n onCleanup();\n }\n return result;\n } catch (err) {\n closeSpanWithError(span, err);\n onCleanup();\n throw err;\n }\n }));\n }\n wrap(...args) {\n const tracer = this;\n const [name, options, fn] = args.length === 3 ? args : [\n args[0],\n {},\n args[1]\n ];\n if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') {\n return fn;\n }\n return function() {\n let optionsObj = options;\n if (typeof optionsObj === 'function' && typeof fn === 'function') {\n optionsObj = optionsObj.apply(this, arguments);\n }\n const lastArgId = arguments.length - 1;\n const cb = arguments[lastArgId];\n if (typeof cb === 'function') {\n const scopeBoundCb = tracer.getContext().bind(context.active(), cb);\n return tracer.trace(name, optionsObj, (_span, done)=>{\n arguments[lastArgId] = function(err) {\n done == null ? void 0 : done(err);\n return scopeBoundCb.apply(this, arguments);\n };\n return fn.apply(this, arguments);\n });\n } else {\n return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments));\n }\n };\n }\n startSpan(...args) {\n const [type, options] = args;\n const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n return this.getTracerInstance().startSpan(type, options, spanContext);\n }\n getSpanContext(parentSpan) {\n const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined;\n return spanContext;\n }\n getRootSpanAttributes() {\n const spanId = context.active().getValue(rootSpanIdKey);\n return rootSpanAttributesStore.get(spanId);\n }\n setRootSpanAttribute(key, value) {\n const spanId = context.active().getValue(rootSpanIdKey);\n const attributes = rootSpanAttributesStore.get(spanId);\n if (attributes) {\n attributes.set(key, value);\n }\n }\n}\nconst getTracer = (()=>{\n const tracer = new NextTracerImpl();\n return ()=>tracer;\n})();\nexport { getTracer, SpanStatusCode, SpanKind };\n\n//# sourceMappingURL=tracer.js.map","import { HeadersAdapter } from '../web/spec-extension/adapters/headers';\nimport { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants';\nimport { getTracer } from '../lib/trace/tracer';\nimport { NodeSpan } from '../lib/trace/constants';\nexport function wrapApiHandler(page, handler) {\n return (...args)=>{\n getTracer().setRootSpanAttribute('next.route', page);\n // Call API route method\n return getTracer().trace(NodeSpan.runHandler, {\n spanName: `executing api route (pages) ${page}`\n }, ()=>handler(...args));\n };\n}\n/**\n *\n * @param res response object\n * @param statusCode `HTTP` status code of response\n */ export function sendStatusCode(res, statusCode) {\n res.statusCode = statusCode;\n return res;\n}\n/**\n *\n * @param res response object\n * @param [statusOrUrl] `HTTP` status code of redirect\n * @param url URL of redirect\n */ export function redirect(res, statusOrUrl, url) {\n if (typeof statusOrUrl === 'string') {\n url = statusOrUrl;\n statusOrUrl = 307;\n }\n if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {\n throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), \"__NEXT_ERROR_CODE\", {\n value: \"E389\",\n enumerable: false,\n configurable: true\n });\n }\n res.writeHead(statusOrUrl, {\n Location: url\n });\n res.write(url);\n res.end();\n return res;\n}\nexport function checkIsOnDemandRevalidate(req, previewProps) {\n const headers = HeadersAdapter.from(req.headers);\n const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER);\n const isOnDemandRevalidate = previewModeId === previewProps.previewModeId;\n const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER);\n return {\n isOnDemandRevalidate,\n revalidateOnlyGenerated\n };\n}\nexport const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`;\nexport const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`;\nexport const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024;\nexport const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA);\nexport const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS);\nexport function clearPreviewData(res, options = {}) {\n if (SYMBOL_CLEARED_COOKIES in res) {\n return res;\n }\n const { serialize } = require('next/dist/compiled/cookie');\n const previous = res.getHeader('Set-Cookie');\n res.setHeader(`Set-Cookie`, [\n ...typeof previous === 'string' ? [\n previous\n ] : Array.isArray(previous) ? previous : [],\n serialize(COOKIE_NAME_PRERENDER_BYPASS, '', {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n expires: new Date(0),\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n ...options.path !== undefined ? {\n path: options.path\n } : undefined\n }),\n serialize(COOKIE_NAME_PRERENDER_DATA, '', {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n expires: new Date(0),\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n ...options.path !== undefined ? {\n path: options.path\n } : undefined\n })\n ]);\n Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, {\n value: true,\n enumerable: false\n });\n return res;\n}\n/**\n * Custom error class\n */ export class ApiError extends Error {\n constructor(statusCode, message){\n super(message);\n this.statusCode = statusCode;\n }\n}\n/**\n * Sends error in `response`\n * @param res response object\n * @param statusCode of response\n * @param message of response\n */ export function sendError(res, statusCode, message) {\n res.statusCode = statusCode;\n res.statusMessage = message;\n res.end(message);\n}\n/**\n * Execute getter function only if its needed\n * @param LazyProps `req` and `params` for lazyProp\n * @param prop name of property\n * @param getter function to get data\n */ export function setLazyProp({ req }, prop, getter) {\n const opts = {\n configurable: true,\n enumerable: true\n };\n const optsReset = {\n ...opts,\n writable: true\n };\n Object.defineProperty(req, prop, {\n ...opts,\n get: ()=>{\n const value = getter();\n // we set the property on the object to avoid recalculating it\n Object.defineProperty(req, prop, {\n ...optsReset,\n value\n });\n return value;\n },\n set: (value)=>{\n Object.defineProperty(req, prop, {\n ...optsReset,\n value\n });\n }\n });\n}\n\n//# sourceMappingURL=index.js.map","import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils';\nexport class DraftModeProvider {\n constructor(previewProps, req, cookies, mutableCookies){\n var _cookies_get;\n // The logic for draftMode() is very similar to tryGetPreviewData()\n // but Draft Mode does not have any data associated with it.\n const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate;\n const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value;\n this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`.\n process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id'));\n this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId;\n this._mutableCookies = mutableCookies;\n }\n get isEnabled() {\n return this._isEnabled;\n }\n enable() {\n if (!this._previewModeId) {\n throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), \"__NEXT_ERROR_CODE\", {\n value: \"E93\",\n enumerable: false,\n configurable: true\n });\n }\n this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: this._previewModeId,\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/'\n });\n this._isEnabled = true;\n }\n disable() {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: '',\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n expires: new Date(0)\n });\n this._isEnabled = false;\n }\n}\n\n//# sourceMappingURL=draft-mode-provider.js.map","import { FLIGHT_HEADERS } from '../../client/components/app-router-headers';\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers';\nimport { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies';\nimport { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies';\nimport { DraftModeProvider } from './draft-mode-provider';\nimport { splitCookiesString } from '../web/utils';\nfunction getHeaders(headers) {\n const cleaned = HeadersAdapter.from(headers);\n for (const header of FLIGHT_HEADERS){\n cleaned.delete(header);\n }\n return HeadersAdapter.seal(cleaned);\n}\nfunction getMutableCookies(headers, onUpdateCookies) {\n const cookies = new RequestCookies(HeadersAdapter.from(headers));\n return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies);\n}\n/**\n * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`),\n * then merge those into the existing cookie object, so that when `cookies()` is accessed\n * it's able to read the newly set cookies.\n */ function mergeMiddlewareCookies(req, existingCookies) {\n if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') {\n const setCookieValue = req.headers['x-middleware-set-cookie'];\n const responseHeaders = new Headers();\n for (const cookie of splitCookiesString(setCookieValue)){\n responseHeaders.append('set-cookie', cookie);\n }\n const responseCookies = new ResponseCookies(responseHeaders);\n // Transfer cookies from ResponseCookies to RequestCookies\n for (const cookie of responseCookies.getAll()){\n existingCookies.set(cookie);\n }\n }\n}\nexport function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) {\n return createRequestStoreImpl(// Pages start in render phase by default\n 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams);\n}\nexport function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) {\n return createRequestStoreImpl(// API routes start in action phase by default\n 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null);\n}\nfunction createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) {\n function defaultOnUpdateCookies(cookies) {\n if (res) {\n res.setHeader('Set-Cookie', cookies);\n }\n }\n const cache = {};\n return {\n type: 'request',\n phase,\n implicitTags,\n // Rather than just using the whole `url` here, we pull the parts we want\n // to ensure we don't use parts of the URL that we shouldn't. This also\n // lets us avoid requiring an empty string for `search` in the type.\n url: {\n pathname: url.pathname,\n search: url.search ?? ''\n },\n rootParams,\n get headers () {\n if (!cache.headers) {\n // Seal the headers object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.headers = getHeaders(req.headers);\n }\n return cache.headers;\n },\n get cookies () {\n if (!cache.cookies) {\n // if middleware is setting cookie(s), then include those in\n // the initial cached cookies so they can be read in render\n const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers));\n mergeMiddlewareCookies(req, requestCookies);\n // Seal the cookies object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.cookies = RequestCookiesAdapter.seal(requestCookies);\n }\n return cache.cookies;\n },\n set cookies (value){\n cache.cookies = value;\n },\n get mutableCookies () {\n if (!cache.mutableCookies) {\n const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined));\n mergeMiddlewareCookies(req, mutableCookies);\n cache.mutableCookies = mutableCookies;\n }\n return cache.mutableCookies;\n },\n get userspaceMutableCookies () {\n if (!cache.userspaceMutableCookies) {\n const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this);\n cache.userspaceMutableCookies = userspaceMutableCookies;\n }\n return cache.userspaceMutableCookies;\n },\n get draftMode () {\n if (!cache.draftMode) {\n cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies);\n }\n return cache.draftMode;\n },\n renderResumeDataCache: renderResumeDataCache ?? null,\n isHmrRefresh,\n serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache,\n devFallbackParams\n };\n}\nexport function synchronizeMutableCookies(store) {\n // TODO: does this need to update headers as well?\n store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies));\n}\n\n//# sourceMappingURL=request-store.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const workUnitAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=work-unit-async-storage-instance.js.map","export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n","// Share the instance module in the next-shared layer\nimport { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nimport { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nexport { workUnitAsyncStorageInstance as workUnitAsyncStorage };\nexport function throwForMissingRequestStore(callingExpression) {\n throw Object.defineProperty(new Error(`\\`${callingExpression}\\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), \"__NEXT_ERROR_CODE\", {\n value: \"E251\",\n enumerable: false,\n configurable: true\n });\n}\nexport function throwInvariantForMissingStore() {\n throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), \"__NEXT_ERROR_CODE\", {\n value: \"E696\",\n enumerable: false,\n configurable: true\n });\n}\nexport function getPrerenderResumeDataCache(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-ppr':\n return workUnitStore.prerenderResumeDataCache;\n case 'prerender-client':\n // TODO eliminate fetch caching in client scope and stop exposing this data\n // cache during SSR.\n return workUnitStore.prerenderResumeDataCache;\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getRenderResumeDataCache(workUnitStore) {\n switch(workUnitStore.type){\n case 'request':\n return workUnitStore.renderResumeDataCache;\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-client':\n if (workUnitStore.renderResumeDataCache) {\n // If we are in a prerender, we might have a render resume data cache\n // that is used to read from prefilled caches.\n return workUnitStore.renderResumeDataCache;\n }\n // fallthrough\n case 'prerender-ppr':\n // Otherwise we return the mutable resume data cache here as an immutable\n // version of the cache as it can also be used for reading.\n return workUnitStore.prerenderResumeDataCache;\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-legacy':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getHmrRefreshHash(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'prerender':\n case 'prerender-runtime':\n return workUnitStore.hmrRefreshHash;\n case 'request':\n var _workUnitStore_cookies_get;\n return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value;\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\nexport function isHmrRefresh(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.isHmrRefresh ?? false;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return false;\n}\nexport function getServerComponentsHmrCache(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.serverComponentsHmrCache;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\n/**\n * Returns a draft mode provider only if draft mode is enabled.\n */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) {\n if (workStore.isDraftMode) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-runtime':\n case 'request':\n return workUnitStore.draftMode;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\nexport function getCacheSignal(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n return workUnitStore.cacheSignal;\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getRuntimeStagePromise(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender-runtime':\n case 'private-cache':\n return workUnitStore.runtimeStagePromise;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\n\n//# sourceMappingURL=work-unit-async-storage.external.js.map","/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */ class LRUNode {\n constructor(key, data, size){\n this.prev = null;\n this.next = null;\n this.key = key;\n this.data = data;\n this.size = size;\n }\n}\n/**\n * Sentinel node used for head/tail boundaries.\n * These nodes don't contain actual cache data but simplify list operations.\n */ class SentinelNode {\n constructor(){\n this.prev = null;\n this.next = null;\n }\n}\n/**\n * LRU (Least Recently Used) Cache implementation using a doubly-linked list\n * and hash map for O(1) operations.\n *\n * Algorithm:\n * - Uses a doubly-linked list to maintain access order (most recent at head)\n * - Hash map provides O(1) key-to-node lookup\n * - Sentinel head/tail nodes simplify edge case handling\n * - Size-based eviction supports custom size calculation functions\n *\n * Data Structure Layout:\n * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL\n *\n * Operations:\n * - get(): Move accessed node to head (mark as most recent)\n * - set(): Add new node at head, evict from tail if over capacity\n * - Eviction: Remove least recent node (tail.prev) when size exceeds limit\n */ export class LRUCache {\n constructor(maxSize, calculateSize, onEvict){\n this.cache = new Map();\n this.totalSize = 0;\n this.maxSize = maxSize;\n this.calculateSize = calculateSize;\n this.onEvict = onEvict;\n // Create sentinel nodes to simplify doubly-linked list operations\n // HEAD <-> TAIL (empty list)\n this.head = new SentinelNode();\n this.tail = new SentinelNode();\n this.head.next = this.tail;\n this.tail.prev = this.head;\n }\n /**\n * Adds a node immediately after the head (marks as most recently used).\n * Used when inserting new items or when an item is accessed.\n * PRECONDITION: node must be disconnected (prev/next should be null)\n */ addToHead(node) {\n node.prev = this.head;\n node.next = this.head.next;\n // head.next is always non-null (points to tail or another node)\n this.head.next.prev = node;\n this.head.next = node;\n }\n /**\n * Removes a node from its current position in the doubly-linked list.\n * Updates the prev/next pointers of adjacent nodes to maintain list integrity.\n * PRECONDITION: node must be connected (prev/next are non-null)\n */ removeNode(node) {\n // Connected nodes always have non-null prev/next\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }\n /**\n * Moves an existing node to the head position (marks as most recently used).\n * This is the core LRU operation - accessed items become most recent.\n */ moveToHead(node) {\n this.removeNode(node);\n this.addToHead(node);\n }\n /**\n * Removes and returns the least recently used node (the one before tail).\n * This is called during eviction when the cache exceeds capacity.\n * PRECONDITION: cache is not empty (ensured by caller)\n */ removeTail() {\n const lastNode = this.tail.prev;\n // tail.prev is always non-null and always LRUNode when cache is not empty\n this.removeNode(lastNode);\n return lastNode;\n }\n /**\n * Sets a key-value pair in the cache.\n * If the key exists, updates the value and moves to head.\n * If new, adds at head and evicts from tail if necessary.\n *\n * Time Complexity:\n * - O(1) for uniform item sizes\n * - O(k) where k is the number of items evicted (can be O(N) for variable sizes)\n */ set(key, value) {\n const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1;\n if (size <= 0) {\n throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), \"__NEXT_ERROR_CODE\", {\n value: \"E789\",\n enumerable: false,\n configurable: true\n });\n }\n if (size > this.maxSize) {\n console.warn('Single item size exceeds maxSize');\n return false;\n }\n const existing = this.cache.get(key);\n if (existing) {\n // Update existing node: adjust size and move to head (most recent)\n existing.data = value;\n this.totalSize = this.totalSize - existing.size + size;\n existing.size = size;\n this.moveToHead(existing);\n } else {\n // Add new node at head (most recent position)\n const newNode = new LRUNode(key, value, size);\n this.cache.set(key, newNode);\n this.addToHead(newNode);\n this.totalSize += size;\n }\n // Evict least recently used items until under capacity\n while(this.totalSize > this.maxSize && this.cache.size > 0){\n const tail = this.removeTail();\n this.cache.delete(tail.key);\n this.totalSize -= tail.size;\n this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data);\n }\n return true;\n }\n /**\n * Checks if a key exists in the cache.\n * This is a pure query operation - does NOT update LRU order.\n *\n * Time Complexity: O(1)\n */ has(key) {\n return this.cache.has(key);\n }\n /**\n * Retrieves a value by key and marks it as most recently used.\n * Moving to head maintains the LRU property for future evictions.\n *\n * Time Complexity: O(1)\n */ get(key) {\n const node = this.cache.get(key);\n if (!node) return undefined;\n // Mark as most recently used by moving to head\n this.moveToHead(node);\n return node.data;\n }\n /**\n * Returns an iterator over the cache entries. The order is outputted in the\n * order of most recently used to least recently used.\n */ *[Symbol.iterator]() {\n let current = this.head.next;\n while(current && current !== this.tail){\n // Between head and tail, current is always LRUNode\n const node = current;\n yield [\n node.key,\n node.data\n ];\n current = current.next;\n }\n }\n /**\n * Removes a specific key from the cache.\n * Updates both the hash map and doubly-linked list.\n *\n * Note: This is an explicit removal and does NOT trigger the `onEvict`\n * callback. Use this for intentional deletions where eviction tracking\n * is not needed.\n *\n * Time Complexity: O(1)\n */ remove(key) {\n const node = this.cache.get(key);\n if (!node) return;\n this.removeNode(node);\n this.cache.delete(key);\n this.totalSize -= node.size;\n }\n /**\n * Returns the number of items in the cache.\n */ get size() {\n return this.cache.size;\n }\n /**\n * Returns the current total size of all cached items.\n * This uses the custom size calculation if provided.\n */ get currentSize() {\n return this.totalSize;\n }\n}\n\n//# sourceMappingURL=lru-cache.js.map","import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n","/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n","import DefaultCacheHandler from '../lib/cache-handlers/default.external';\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{\n console.log(`use-cache: ${message}`, ...args);\n} : undefined;\nconst handlersSymbol = Symbol.for('@next/cache-handlers');\nconst handlersMapSymbol = Symbol.for('@next/cache-handlers-map');\nconst handlersSetSymbol = Symbol.for('@next/cache-handlers-set');\n/**\n * The reference to the cache handlers. We store the cache handlers on the\n * global object so that we can access the same instance across different\n * boundaries (such as different copies of the same module).\n */ const reference = globalThis;\n/**\n * Initialize the cache handlers.\n * @returns `true` if the cache handlers were initialized, `false` if they were already initialized.\n */ export function initializeCacheHandlers() {\n // If the cache handlers have already been initialized, don't do it again.\n if (reference[handlersMapSymbol]) {\n debug == null ? void 0 : debug('cache handlers already initialized');\n return false;\n }\n debug == null ? void 0 : debug('initializing cache handlers');\n reference[handlersMapSymbol] = new Map();\n // Initialize the cache from the symbol contents first.\n if (reference[handlersSymbol]) {\n let fallback;\n if (reference[handlersSymbol].DefaultCache) {\n debug == null ? void 0 : debug('setting \"default\" cache handler from symbol');\n fallback = reference[handlersSymbol].DefaultCache;\n } else {\n debug == null ? void 0 : debug('setting \"default\" cache handler from default');\n fallback = DefaultCacheHandler;\n }\n reference[handlersMapSymbol].set('default', fallback);\n if (reference[handlersSymbol].RemoteCache) {\n debug == null ? void 0 : debug('setting \"remote\" cache handler from symbol');\n reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache);\n } else {\n debug == null ? void 0 : debug('setting \"remote\" cache handler from default');\n reference[handlersMapSymbol].set('remote', fallback);\n }\n } else {\n debug == null ? void 0 : debug('setting \"default\" cache handler from default');\n reference[handlersMapSymbol].set('default', DefaultCacheHandler);\n debug == null ? void 0 : debug('setting \"remote\" cache handler from default');\n reference[handlersMapSymbol].set('remote', DefaultCacheHandler);\n }\n // Create a set of the cache handlers.\n reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values());\n return true;\n}\n/**\n * Get a cache handler by kind.\n * @param kind - The kind of cache handler to get.\n * @returns The cache handler, or `undefined` if it does not exist.\n * @throws If the cache handlers are not initialized.\n */ export function getCacheHandler(kind) {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol]) {\n throw Object.defineProperty(new Error('Cache handlers not initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E649\",\n enumerable: false,\n configurable: true\n });\n }\n return reference[handlersMapSymbol].get(kind);\n}\n/**\n * Get a set iterator over the cache handlers.\n * @returns An iterator over the cache handlers, or `undefined` if they are not\n * initialized.\n */ export function getCacheHandlers() {\n if (!reference[handlersSetSymbol]) {\n return undefined;\n }\n return reference[handlersSetSymbol].values();\n}\n/**\n * Get a map iterator over the cache handlers (keyed by kind).\n * @returns An iterator over the cache handler entries, or `undefined` if they\n * are not initialized.\n * @throws If the cache handlers are not initialized.\n */ export function getCacheHandlerEntries() {\n if (!reference[handlersMapSymbol]) {\n return undefined;\n }\n return reference[handlersMapSymbol].entries();\n}\n/**\n * Set a cache handler by kind.\n * @param kind - The kind of cache handler to set.\n * @param cacheHandler - The cache handler to set.\n */ export function setCacheHandler(kind, cacheHandler) {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) {\n throw Object.defineProperty(new Error('Cache handlers not initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E649\",\n enumerable: false,\n configurable: true\n });\n }\n debug == null ? void 0 : debug('setting cache handler for \"%s\"', kind);\n reference[handlersMapSymbol].set(kind, cacheHandler);\n reference[handlersSetSymbol].add(cacheHandler);\n}\n\n//# sourceMappingURL=handlers.js.map","import { getCacheHandlers } from './use-cache/handlers';\n/** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) {\n if (!store) {\n return callback();\n }\n // If we executed any revalidates during the request, then we don't want to execute them again.\n // save the state so we can check if anything changed after we're done running callbacks.\n const savedRevalidationState = cloneRevalidationState(store);\n try {\n return await callback();\n } finally{\n // Check if we have any new revalidates, and if so, wait until they are all resolved.\n const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store));\n await executeRevalidates(store, newRevalidates);\n }\n}\nfunction cloneRevalidationState(store) {\n return {\n pendingRevalidatedTags: store.pendingRevalidatedTags ? [\n ...store.pendingRevalidatedTags\n ] : [],\n pendingRevalidates: {\n ...store.pendingRevalidates\n },\n pendingRevalidateWrites: store.pendingRevalidateWrites ? [\n ...store.pendingRevalidateWrites\n ] : []\n };\n}\nfunction diffRevalidationState(prev, curr) {\n const prevTags = new Set(prev.pendingRevalidatedTags);\n const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites);\n return {\n pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)),\n pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))),\n pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise))\n };\n}\nasync function revalidateTags(tags, incrementalCache) {\n if (tags.length === 0) {\n return;\n }\n const promises = [];\n if (incrementalCache) {\n promises.push(incrementalCache.revalidateTag(tags));\n }\n const handlers = getCacheHandlers();\n if (handlers) {\n for (const handler of handlers){\n promises.push(handler.expireTags(...tags));\n }\n }\n await Promise.all(promises);\n}\nexport async function executeRevalidates(workStore, state) {\n const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? [];\n const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {};\n const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? [];\n return Promise.all([\n revalidateTags(pendingRevalidatedTags, workStore.incrementalCache),\n ...Object.values(pendingRevalidates),\n ...pendingRevalidateWrites\n ]);\n}\n\n//# sourceMappingURL=revalidation-utils.js.map","const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), \"__NEXT_ERROR_CODE\", {\n value: \"E504\",\n enumerable: false,\n configurable: true\n});\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n static bind(fn) {\n return fn;\n }\n}\nconst maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;\nexport function createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nexport function bindSnapshot(fn) {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn);\n }\n return FakeAsyncLocalStorage.bind(fn);\n}\nexport function createSnapshot() {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot();\n }\n return function(fn, ...args) {\n return fn(...args);\n };\n}\n\n//# sourceMappingURL=async-local-storage.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const afterTaskAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=after-task-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { afterTaskAsyncStorage };\n\n//# sourceMappingURL=after-task-async-storage.external.js.map","import PromiseQueue from 'next/dist/compiled/p-queue';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nimport { isThenable } from '../../shared/lib/is-thenable';\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { withExecuteRevalidates } from '../revalidation-utils';\nimport { bindSnapshot } from '../app-render/async-local-storage';\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external';\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external';\nexport class AfterContext {\n constructor({ waitUntil, onClose, onTaskError }){\n this.workUnitStores = new Set();\n this.waitUntil = waitUntil;\n this.onClose = onClose;\n this.onTaskError = onTaskError;\n this.callbackQueue = new PromiseQueue();\n this.callbackQueue.pause();\n }\n after(task) {\n if (isThenable(task)) {\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable();\n }\n this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error)));\n } else if (typeof task === 'function') {\n // TODO(after): implement tracing\n this.addCallback(task);\n } else {\n throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), \"__NEXT_ERROR_CODE\", {\n value: \"E50\",\n enumerable: false,\n configurable: true\n });\n }\n }\n addCallback(callback) {\n // if something is wrong, throw synchronously, bubbling up to the `after` callsite.\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable();\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n this.workUnitStores.add(workUnitStore);\n }\n const afterTaskStore = afterTaskAsyncStorage.getStore();\n // This is used for checking if request APIs can be called inside `after`.\n // Note that we need to check the phase in which the *topmost* `after` was called (which should be \"action\"),\n // not the current phase (which might be \"after\" if we're in a nested after).\n // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`.\n const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after\n : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after\n ;\n // this should only happen once.\n if (!this.runCallbacksOnClosePromise) {\n this.runCallbacksOnClosePromise = this.runCallbacksOnClose();\n this.waitUntil(this.runCallbacksOnClosePromise);\n }\n // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es).\n // We do this because we want all of these to be equivalent in every regard except timing:\n // after(() => x())\n // after(x())\n // await x()\n const wrappedCallback = bindSnapshot(async ()=>{\n try {\n await afterTaskAsyncStorage.run({\n rootTaskSpawnPhase\n }, ()=>callback());\n } catch (error) {\n this.reportTaskError('function', error);\n }\n });\n this.callbackQueue.add(wrappedCallback);\n }\n async runCallbacksOnClose() {\n await new Promise((resolve)=>this.onClose(resolve));\n return this.runCallbacks();\n }\n async runCallbacks() {\n if (this.callbackQueue.size === 0) return;\n for (const workUnitStore of this.workUnitStores){\n workUnitStore.phase = 'after';\n }\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), \"__NEXT_ERROR_CODE\", {\n value: \"E547\",\n enumerable: false,\n configurable: true\n });\n }\n return withExecuteRevalidates(workStore, ()=>{\n this.callbackQueue.start();\n return this.callbackQueue.onIdle();\n });\n }\n reportTaskError(taskKind, error) {\n // TODO(after): this is fine for now, but will need better intergration with our error reporting.\n // TODO(after): should we log this if we have a onTaskError callback?\n console.error(taskKind === 'promise' ? `A promise passed to \\`after()\\` rejected:` : `An error occurred in a function passed to \\`after()\\`:`, error);\n if (this.onTaskError) {\n // this is very defensive, but we really don't want anything to blow up in an error handler\n try {\n this.onTaskError == null ? void 0 : this.onTaskError.call(this, error);\n } catch (handlerError) {\n console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', {\n cause: handlerError\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E569\",\n enumerable: false,\n configurable: true\n }));\n }\n }\n }\n}\nfunction errorWaitUntilNotAvailable() {\n throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), \"__NEXT_ERROR_CODE\", {\n value: \"E91\",\n enumerable: false,\n configurable: true\n });\n}\n\n//# sourceMappingURL=after-context.js.map","/**\n * Calls the given async function only when the returned promise-like object is\n * awaited. Afterwards, it provides the resolved value synchronously as `value`\n * property.\n */ export function createLazyResult(fn) {\n let pendingResult;\n const result = {\n then (onfulfilled, onrejected) {\n if (!pendingResult) {\n pendingResult = fn();\n }\n pendingResult.then((value)=>{\n result.value = value;\n }).catch(()=>{\n // The externally awaited result will be rejected via `onrejected`. We\n // don't need to handle it here. But we do want to avoid an unhandled\n // rejection.\n });\n return pendingResult.then(onfulfilled, onrejected);\n }\n };\n return result;\n}\nexport function isResolvedLazyResult(result) {\n return result.hasOwnProperty('value');\n}\n\n//# sourceMappingURL=lazy-result.js.map","import { AfterContext } from '../after/after-context';\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths';\nimport { createLazyResult } from '../lib/lazy-result';\nimport { getCacheHandlerEntries } from '../use-cache/handlers';\nimport { createSnapshot } from '../app-render/async-local-storage';\nexport function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) {\n /**\n * Rules of Static & Dynamic HTML:\n *\n * 1.) We must generate static HTML unless the caller explicitly opts\n * in to dynamic HTML support.\n *\n * 2.) If dynamic HTML support is requested, we must honor that request\n * or throw an error. It is the sole responsibility of the caller to\n * ensure they aren't e.g. requesting dynamic HTML for an AMP page.\n *\n * 3.) If the request is in draft mode, we must generate dynamic HTML.\n *\n * 4.) If the request is a server action, we must generate dynamic HTML.\n *\n * These rules help ensure that other existing features like request caching,\n * coalescing, and ISR continue working as intended.\n */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction;\n const isDevelopment = renderOpts.dev ?? false;\n const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is\n // when we are performing a static generation and we either are in debug\n // mode, or tracking fetch metrics was specifically opted into.\n isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1');\n const store = {\n isStaticGeneration,\n page,\n route: normalizeAppPath(page),\n incrementalCache: // we fallback to a global incremental cache for edge-runtime locally\n // so that it can access the fs cache without mocks\n renderOpts.incrementalCache || globalThis.__incrementalCache,\n cacheLifeProfiles: renderOpts.cacheLifeProfiles,\n isRevalidate: renderOpts.isRevalidate,\n isBuildTimePrerendering: renderOpts.nextExport,\n hasReadableErrorStacks: renderOpts.hasReadableErrorStacks,\n fetchCache: renderOpts.fetchCache,\n isOnDemandRevalidate: renderOpts.isOnDemandRevalidate,\n isDraftMode: renderOpts.isDraftMode,\n isPrefetchRequest,\n buildId,\n reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {},\n assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '',\n afterContext: createAfterContext(renderOpts),\n cacheComponentsEnabled: renderOpts.experimental.cacheComponents,\n dev: isDevelopment,\n previouslyRevalidatedTags,\n refreshTagsByCacheKind: createRefreshTagsByCacheKind(),\n runInCleanSnapshot: createSnapshot(),\n shouldTrackFetchMetrics\n };\n // TODO: remove this when we resolve accessing the store outside the execution context\n renderOpts.store = store;\n return store;\n}\nfunction createAfterContext(renderOpts) {\n const { waitUntil, onClose, onAfterTaskError } = renderOpts;\n return new AfterContext({\n waitUntil,\n onClose,\n onTaskError: onAfterTaskError\n });\n}\n/**\n * Creates a map with lazy results that refresh tags for the respective cache\n * kind when they're awaited for the first time.\n */ function createRefreshTagsByCacheKind() {\n const refreshTagsByCacheKind = new Map();\n const cacheHandlers = getCacheHandlerEntries();\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers){\n if ('refreshTags' in cacheHandler) {\n refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags()));\n }\n }\n }\n return refreshTagsByCacheKind;\n}\n\n//# sourceMappingURL=work-store.js.map","/** Monitor when the consumer finishes reading the response body.\nthat's as close as we can get to `res.on('close')` using web APIs.\n*/ export function trackBodyConsumed(body, onEnd) {\n if (typeof body === 'string') {\n const generator = async function* generate() {\n const encoder = new TextEncoder();\n yield encoder.encode(body);\n onEnd();\n };\n // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice\n return generator();\n } else {\n return trackStreamConsumed(body, onEnd);\n }\n}\nexport function trackStreamConsumed(stream, onEnd) {\n // NOTE: This function must handle `stream` being aborted or cancelled,\n // so it can't just be this:\n //\n // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } }))\n //\n // because that doesn't handle cancellations.\n // (and cancellation handling via `Transformer.cancel` is only available in node >20)\n const dest = new TransformStream();\n const runOnEnd = ()=>onEnd();\n stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd);\n return dest.readable;\n}\nexport class CloseController {\n onClose(callback) {\n if (this.isClosed) {\n throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), \"__NEXT_ERROR_CODE\", {\n value: \"E365\",\n enumerable: false,\n configurable: true\n });\n }\n this.target.addEventListener('close', callback);\n this.listeners++;\n }\n dispatchClose() {\n if (this.isClosed) {\n throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), \"__NEXT_ERROR_CODE\", {\n value: \"E229\",\n enumerable: false,\n configurable: true\n });\n }\n if (this.listeners > 0) {\n this.target.dispatchEvent(new Event('close'));\n }\n this.isClosed = true;\n }\n constructor(){\n this.target = new EventTarget();\n this.listeners = 0;\n this.isClosed = false;\n }\n}\n\n//# sourceMappingURL=web-on-close.js.map","/**\n * In edge runtime, these props directly accessed from environment variables.\n * - local: env vars will be injected through edge-runtime as runtime env vars\n * - deployment: env vars will be replaced by edge build pipeline\n */ export function getEdgePreviewProps() {\n return {\n previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '',\n previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '',\n previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || ''\n };\n}\n\n//# sourceMappingURL=get-edge-preview-props.js.map","import { createAsyncLocalStorage } from '../app-render/async-local-storage';\nexport function getBuiltinRequestContext() {\n const _globalThis = globalThis;\n const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL];\n return ctx == null ? void 0 : ctx.get();\n}\nconst NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context');\n/** \"@next/request-context\" has a different signature from AsyncLocalStorage,\n * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context).\n * We don't need a full AsyncContext adapter here, just having `.get()` is enough\n */ export function createLocalRequestContext() {\n const storage = createAsyncLocalStorage();\n return {\n get: ()=>storage.getStore(),\n run: (value, callback)=>storage.run(value, callback)\n };\n}\n\n//# sourceMappingURL=builtin-request-context.js.map","import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants';\nimport { getCacheHandlerEntries } from '../use-cache/handlers';\nimport { createLazyResult } from './lazy-result';\nconst getDerivedTags = (pathname)=>{\n const derivedTags = [\n `/layout`\n ];\n // we automatically add the current path segments as tags\n // for revalidatePath handling\n if (pathname.startsWith('/')) {\n const pathnameParts = pathname.split('/');\n for(let i = 1; i < pathnameParts.length + 1; i++){\n let curPathname = pathnameParts.slice(0, i).join('/');\n if (curPathname) {\n // all derived tags other than the page are layout tags\n if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) {\n curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`;\n }\n derivedTags.push(curPathname);\n }\n }\n }\n return derivedTags;\n};\n/**\n * Creates a map with lazy results that fetch the expiration value for the given\n * tags and respective cache kind when they're awaited for the first time.\n */ function createTagsExpirationsByCacheKind(tags) {\n const expirationsByCacheKind = new Map();\n const cacheHandlers = getCacheHandlerEntries();\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers){\n if ('getExpiration' in cacheHandler) {\n expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags)));\n }\n }\n }\n return expirationsByCacheKind;\n}\nexport async function getImplicitTags(page, url, fallbackRouteParams) {\n const tags = [];\n const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0;\n // Add the derived tags from the page.\n const derivedTags = getDerivedTags(page);\n for (let tag of derivedTags){\n tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`;\n tags.push(tag);\n }\n // Add the tags from the pathname. If the route has unknown params, we don't\n // want to add the pathname as a tag, as it will be invalid.\n if (url.pathname && !hasFallbackRouteParams) {\n const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`;\n tags.push(tag);\n }\n return {\n tags,\n expirationsByCacheKind: createTagsExpirationsByCacheKind(tags)\n };\n}\n\n//# sourceMappingURL=implicit-tags.js.map","/**\n * Normalizes the raw RSC header value. Only the literal string \"1\" is treated\n * as a valid RSC request marker; malformed or repeated values are ignored.\n */ export function isRSCRequestHeader(value) {\n return value === '1';\n}\n\n//# sourceMappingURL=is-rsc-request.js.map","import { PageSignatureError } from './error';\nimport { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils';\nimport { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event';\nimport { NextRequest } from './spec-extension/request';\nimport { NextResponse } from './spec-extension/response';\nimport { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url';\nimport { NextURL } from './next-url';\nimport { stripInternalSearchParams } from '../internal-utils';\nimport { normalizeRscURL } from '../../shared/lib/router/utils/app-paths';\nimport { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers';\nimport { ensureInstrumentationRegistered } from './globals';\nimport { createRequestStoreForAPI } from '../async-storage/request-store';\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external';\nimport { createWorkStore } from '../async-storage/work-store';\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers';\nimport { getTracer } from '../lib/trace/tracer';\nimport { MiddlewareSpan } from '../lib/trace/constants';\nimport { CloseController } from './web-on-close';\nimport { getEdgePreviewProps } from './get-edge-preview-props';\nimport { getBuiltinRequestContext } from '../after/builtin-request-context';\nimport { getImplicitTags } from '../lib/implicit-tags';\nimport { isRSCRequestHeader } from '../lib/is-rsc-request';\nexport class NextRequestHint extends NextRequest {\n constructor(params){\n super(params.input, params.init);\n this.sourcePage = params.page;\n }\n get request() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n respondWith() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n waitUntil() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n}\nconst headersGetter = {\n keys: (headers)=>Array.from(headers.keys()),\n get: (headers, key)=>headers.get(key) ?? undefined\n};\nlet propagator = (request, fn)=>{\n const tracer = getTracer();\n return tracer.withPropagatedContext(request.headers, fn, headersGetter);\n};\nlet testApisIntercepted = false;\nfunction ensureTestApisIntercepted() {\n if (!testApisIntercepted) {\n testApisIntercepted = true;\n if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') {\n const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm\n require('next/dist/experimental/testmode/server-edge');\n interceptTestApis();\n propagator = wrapRequestHandler(propagator);\n }\n }\n}\nexport async function adapter(params) {\n var _getBuiltinRequestContext;\n ensureTestApisIntercepted();\n await ensureInstrumentationRegistered();\n // TODO-APP: use explicit marker for this\n const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined';\n params.request.url = normalizeRscURL(params.request.url);\n const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, {\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator.\n // Instead we use the keys before iteration.\n const keys = [\n ...requestURL.searchParams.keys()\n ];\n for (const key of keys){\n const value = requestURL.searchParams.getAll(key);\n const normalizedKey = normalizeNextQueryParam(key);\n if (normalizedKey) {\n requestURL.searchParams.delete(normalizedKey);\n for (const val of value){\n requestURL.searchParams.append(normalizedKey, val);\n }\n requestURL.searchParams.delete(key);\n }\n }\n // Ensure users only see page requests, never data requests.\n let buildId = process.env.__NEXT_BUILD_ID || '';\n if ('buildId' in requestURL) {\n buildId = requestURL.buildId || '';\n requestURL.buildId = '';\n }\n const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers);\n const isNextDataRequest = requestHeaders.has('x-nextjs-data');\n const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER));\n if (isNextDataRequest && requestURL.pathname === '/index') {\n requestURL.pathname = '/';\n }\n const flightHeaders = new Map();\n // Headers should only be stripped for middleware\n if (!isEdgeRendering) {\n for (const header of FLIGHT_HEADERS){\n const value = requestHeaders.get(header);\n if (value !== null) {\n flightHeaders.set(header, value);\n requestHeaders.delete(header);\n }\n }\n }\n const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL;\n const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY);\n const request = new NextRequestHint({\n page: params.page,\n // Strip internal query parameters off the request.\n input: stripInternalSearchParams(normalizeURL).toString(),\n init: {\n body: params.request.body,\n headers: requestHeaders,\n method: params.request.method,\n nextConfig: params.request.nextConfig,\n signal: params.request.signal\n }\n });\n /**\n * This allows to identify the request as a data request. The user doesn't\n * need to know about this property neither use it. We add it for testing\n * purposes.\n */ if (isNextDataRequest) {\n Object.defineProperty(request, '__isData', {\n enumerable: false,\n value: true\n });\n }\n if (// If we are inside of the next start sandbox\n // leverage the shared instance if not we need\n // to create a fresh cache instance each time\n !globalThis.__incrementalCacheShared && params.IncrementalCache) {\n ;\n globalThis.__incrementalCache = new params.IncrementalCache({\n CurCacheHandler: params.incrementalCacheHandler,\n minimalMode: process.env.NODE_ENV !== 'development',\n fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX,\n dev: process.env.NODE_ENV === 'development',\n requestHeaders: params.request.headers,\n getPrerenderManifest: ()=>{\n return {\n version: -1,\n routes: {},\n dynamicRoutes: {},\n notFoundRoutes: [],\n preview: getEdgePreviewProps()\n };\n }\n });\n }\n // if we're in an edge runtime sandbox, we should use the waitUntil\n // that we receive from the enclosing NextServer\n const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil);\n const event = new NextFetchEvent({\n request,\n page: params.page,\n context: outerWaitUntil ? {\n waitUntil: outerWaitUntil\n } : undefined\n });\n let response;\n let cookiesFromResponse;\n response = await propagator(request, ()=>{\n // we only care to make async storage available for middleware\n const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware';\n if (isMiddleware) {\n // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`),\n // so we have to inject it via DefinePlugin.\n // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`).\n const waitUntil = event.waitUntil.bind(event);\n const closeController = new CloseController();\n return getTracer().trace(MiddlewareSpan.execute, {\n spanName: `middleware ${request.method} ${request.nextUrl.pathname}`,\n attributes: {\n 'http.target': request.nextUrl.pathname,\n 'http.method': request.method\n }\n }, async ()=>{\n try {\n var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1;\n const onUpdateCookies = (cookies)=>{\n cookiesFromResponse = cookies;\n };\n const previewProps = getEdgePreviewProps();\n const page = '/' // Fake Work\n ;\n const fallbackRouteParams = null;\n const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams);\n const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps);\n const workStore = createWorkStore({\n page,\n renderOpts: {\n cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife,\n experimental: {\n isRoutePPREnabled: false,\n cacheComponents: false,\n authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts)\n },\n supportsDynamicResponse: true,\n waitUntil,\n onClose: closeController.onClose.bind(closeController),\n onAfterTaskError: undefined\n },\n isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1',\n buildId: buildId ?? '',\n previouslyRevalidatedTags: []\n });\n return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event));\n } finally{\n // middleware cannot stream, so we can consider the response closed\n // as soon as the handler returns.\n // we can delay running it until a bit later --\n // if it's needed, we'll have a `waitUntil` lock anyway.\n setTimeout(()=>{\n closeController.dispatchClose();\n }, 0);\n }\n });\n }\n return params.handler(request, event);\n });\n // check if response is a Response object\n if (response && !(response instanceof Response)) {\n throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), \"__NEXT_ERROR_CODE\", {\n value: \"E567\",\n enumerable: false,\n configurable: true\n });\n }\n if (response && cookiesFromResponse) {\n response.headers.set('set-cookie', cookiesFromResponse);\n }\n /**\n * For rewrites we must always include the locale in the final pathname\n * so we re-create the NextURL forcing it to include it when the it is\n * an internal rewrite. Also we make sure the outgoing rewrite URL is\n * a data URL if the request was a data request.\n */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite');\n if (response && rewrite && (isRSCRequest || !isEdgeRendering)) {\n const destination = new NextURL(rewrite, {\n forceLocale: true,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) {\n if (destination.host === request.nextUrl.host) {\n destination.buildId = buildId || destination.buildId;\n response.headers.set('x-middleware-rewrite', String(destination));\n }\n }\n /**\n * When the request is a data request we must show if there was a rewrite\n * with an internal header so the client knows which component to load\n * from the data request.\n */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString());\n if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite\n // resolving config is enabled don't add this header\n // so the upstream app can set it instead\n !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\\/\\//))) {\n response.headers.set('x-nextjs-rewrite', relativeDestination);\n }\n // If this is an RSC request, and the pathname or search has changed, and\n // this isn't an external rewrite, we need to set the rewritten pathname and\n // query headers.\n if (isRSCRequest && isRelative) {\n if (requestURL.pathname !== destination.pathname) {\n response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname);\n }\n if (requestURL.search !== destination.search) {\n response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string\n destination.search.slice(1));\n }\n }\n }\n /**\n * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests,\n * unless it's already present. This is necessary to ensure that RSC hash validation\n * works correctly after a rewrite. For internal rewrites, the server can validate the\n * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical.\n * However, for external rewrites (where the request is proxied to another Next.js server),\n * the external server does not have access to the original URL or its search parameters.\n * In these cases, forwarding the `_rsc` parameter is essential so that the external server\n * can perform the correct RSC hash validation.\n */ if (response && rewrite && isRSCRequest && rscHash) {\n const rewriteURL = new URL(rewrite);\n if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) {\n rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash);\n response.headers.set('x-middleware-rewrite', rewriteURL.toString());\n }\n }\n /**\n * For redirects we will not include the locale in case when it is the\n * default and we must also make sure the outgoing URL is a data one if\n * the incoming request was a data request.\n */ const redirect = response == null ? void 0 : response.headers.get('Location');\n if (response && redirect && !isEdgeRendering) {\n const redirectURL = new NextURL(redirect, {\n forceLocale: false,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n /**\n * Responses created from redirects have immutable headers so we have\n * to clone the response to be able to modify it.\n */ response = new Response(response.body, response);\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) {\n if (redirectURL.host === requestURL.host) {\n redirectURL.buildId = buildId || redirectURL.buildId;\n response.headers.set('Location', redirectURL.toString());\n }\n }\n /**\n * When the request is a data request we can't use the location header as\n * it may end up with CORS error. Instead we map to an internal header so\n * the client knows the destination.\n */ if (isNextDataRequest) {\n response.headers.delete('Location');\n response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString()));\n }\n }\n const finalResponse = response ? response : NextResponse.next();\n // Flight headers are not overridable / removable so they are applied at the end.\n const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers');\n const overwrittenHeaders = [];\n if (middlewareOverrideHeaders) {\n for (const [key, value] of flightHeaders){\n finalResponse.headers.set(`x-middleware-request-${key}`, value);\n overwrittenHeaders.push(key);\n }\n if (overwrittenHeaders.length > 0) {\n finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(','));\n }\n }\n return {\n response: finalResponse,\n waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(),\n fetchMetrics: request.fetchMetrics\n };\n}\n\n//# sourceMappingURL=adapter.js.map","import parseua from 'next/dist/compiled/ua-parser-js';\nexport function isBot(input) {\n return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input);\n}\nexport function userAgentFromString(input) {\n return {\n ...parseua(input),\n isBot: input === undefined ? false : isBot(input)\n };\n}\nexport function userAgent({ headers }) {\n return userAgentFromString(headers.get('user-agent') || undefined);\n}\n\n//# sourceMappingURL=user-agent.js.map","const GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js\ntypeof URLPattern === 'undefined' ? undefined : URLPattern;\nexport { GlobalURLPattern as URLPattern };\n\n//# sourceMappingURL=url-pattern.js.map","import { workAsyncStorage } from '../app-render/work-async-storage.external';\n/**\n * This function allows you to schedule callbacks to be executed after the current request finishes.\n */ export function after(task) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore\n throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), \"__NEXT_ERROR_CODE\", {\n value: \"E468\",\n enumerable: false,\n configurable: true\n });\n }\n const { afterContext } = workStore;\n return afterContext.after(task);\n}\n\n//# sourceMappingURL=after.js.map","export * from './after';\n\n//# sourceMappingURL=index.js.map","const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n","const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n","export function isHangingPromiseRejectionError(err) {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false;\n }\n return err.digest === HANGING_PROMISE_REJECTION;\n}\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION';\nclass HangingPromiseRejectionError extends Error {\n constructor(route, expression){\n super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;\n }\n}\nconst abortListenersBySignal = new WeakMap();\n/**\n * This function constructs a promise that will never resolve. This is primarily\n * useful for cacheComponents where we use promise resolution timing to determine which\n * parts of a render can be included in a prerender.\n *\n * @internal\n */ export function makeHangingPromise(signal, route, expression) {\n if (signal.aborted) {\n return Promise.reject(new HangingPromiseRejectionError(route, expression));\n } else {\n const hangingPromise = new Promise((_, reject)=>{\n const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression));\n let currentListeners = abortListenersBySignal.get(signal);\n if (currentListeners) {\n currentListeners.push(boundRejection);\n } else {\n const listeners = [\n boundRejection\n ];\n abortListenersBySignal.set(signal, listeners);\n signal.addEventListener('abort', ()=>{\n for(let i = 0; i < listeners.length; i++){\n listeners[i]();\n }\n }, {\n once: true\n });\n }\n });\n // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so\n // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct\n // your own promise out of it you'll need to ensure you handle the error when it rejects.\n hangingPromise.catch(ignoreReject);\n return hangingPromise;\n }\n}\nfunction ignoreReject() {}\nexport function makeDevtoolsIOAwarePromise(underlying) {\n // in React DevTools if we resolve in a setTimeout we will observe\n // the promise resolution as something that can suspend a boundary or root.\n return new Promise((resolve)=>{\n // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n setTimeout(()=>{\n resolve(underlying);\n }, 0);\n });\n}\n\n//# sourceMappingURL=dynamic-rendering-utils.js.map","export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__';\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__';\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__';\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__';\n\n//# sourceMappingURL=boundary-constants.js.map","// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n","/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n","import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n","import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n","// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n","import { createAsyncLocalStorage } from './async-local-storage';\nexport const actionAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=action-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { actionAsyncStorageInstance } from './action-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { actionAsyncStorageInstance as actionAsyncStorage };\n\n//# sourceMappingURL=action-async-storage.external.js.map","// ISC License\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\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// 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\nvar _globalThis;\nconst { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {};\nconst enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || (stdout == null ? void 0 : stdout.isTTY) && !env.CI && env.TERM !== 'dumb');\nconst replaceClose = (str, close, replace, index)=>{\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 ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\nconst formatter = (open, close, replace = open)=>{\n if (!enabled) return String;\n return (input)=>{\n const string = '' + input;\n const index = string.indexOf(close, open.length);\n return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;\n };\n};\nexport const reset = enabled ? (s)=>`\\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\n//# sourceMappingURL=picocolors.js.map","import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors';\nimport { LRUCache } from '../../server/lib/lru-cache';\nexport const prefixes = {\n wait: white(bold('○')),\n error: red(bold('⨯')),\n warn: yellow(bold('⚠')),\n ready: '▲',\n info: white(bold(' ')),\n event: green(bold('✓')),\n trace: magenta(bold('»'))\n};\nconst LOGGING_METHOD = {\n log: 'log',\n warn: 'warn',\n error: 'error'\n};\nfunction prefixedLog(prefixType, ...message) {\n if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n message.shift();\n }\n const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log';\n const prefix = prefixes[prefixType];\n // If there's no message, don't print the prefix but a new line\n if (message.length === 0) {\n console[consoleMethod]('');\n } else {\n // Ensure if there's ANSI escape codes it's concatenated into one string.\n // Chrome DevTool can only handle color if it's in one string.\n if (message.length === 1 && typeof message[0] === 'string') {\n console[consoleMethod](' ' + prefix + ' ' + message[0]);\n } else {\n console[consoleMethod](' ' + prefix, ...message);\n }\n }\n}\nexport function bootstrap(...message) {\n // logging format: ' '\n // e.g. ' ✓ Compiled successfully'\n // Add spaces to align with the indent of other logs\n console.log(' ' + message.join(' '));\n}\nexport function wait(...message) {\n prefixedLog('wait', ...message);\n}\nexport function error(...message) {\n prefixedLog('error', ...message);\n}\nexport function warn(...message) {\n prefixedLog('warn', ...message);\n}\nexport function ready(...message) {\n prefixedLog('ready', ...message);\n}\nexport function info(...message) {\n prefixedLog('info', ...message);\n}\nexport function event(...message) {\n prefixedLog('event', ...message);\n}\nexport function trace(...message) {\n prefixedLog('trace', ...message);\n}\nconst warnOnceCache = new LRUCache(10000, (value)=>value.length);\nexport function warnOnce(...message) {\n const key = message.join(' ');\n if (!warnOnceCache.has(key)) {\n warnOnceCache.set(key, key);\n warn(...message);\n }\n}\n\n//# sourceMappingURL=log.js.map","import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n","// Alias index file of next/server for edge runtime for tree-shaking purpose\nexport { ImageResponse } from '../spec-extension/image-response';\nexport { NextRequest } from '../spec-extension/request';\nexport { NextResponse } from '../spec-extension/response';\nexport { userAgent, userAgentFromString } from '../spec-extension/user-agent';\nexport { URLPattern } from '../spec-extension/url-pattern';\nexport { after } from '../../after';\nexport { connection } from '../../request/connection';\nexport { unstable_rootParams } from '../../request/root-params';\n\n//# sourceMappingURL=index.js.map","export * from '../server/web/exports/index';\n\n//# sourceMappingURL=server.js.map","import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n","export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n","export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n","import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n","import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n","import \"next/dist/server/web/globals\";\nimport { adapter } from \"next/dist/server/web/adapter\";\n// Import the userland code.\nimport * as _mod from \"private-next-root-dir/src/middleware.js\";\nimport { edgeInstrumentationOnRequestError } from \"next/dist/server/web/globals\";\nimport { isNextRouterError } from \"next/dist/client/components/is-next-router-error\";\nconst mod = {\n ..._mod\n};\nconst handler = mod.middleware || mod.default;\nconst page = \"/src/middleware\";\nif (typeof handler !== 'function') {\n throw Object.defineProperty(new Error(`The Middleware \"${page}\" must export a \\`middleware\\` or a \\`default\\` function`), \"__NEXT_ERROR_CODE\", {\n value: \"E120\",\n enumerable: false,\n configurable: true\n });\n}\n// Middleware will only sent out the FetchEvent to next server,\n// so load instrumentation module here and track the error inside middleware module.\nfunction errorHandledHandler(fn) {\n return async (...args)=>{\n try {\n return await fn(...args);\n } catch (err) {\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in middleware as it's outside of react component tree.\n if (process.env.NODE_ENV !== 'production') {\n if (isNextRouterError(err)) {\n err.message = `Next.js navigation API is not allowed to be used in Middleware.`;\n throw err;\n }\n }\n const req = args[0];\n const url = new URL(req.url);\n const resource = url.pathname + url.search;\n await edgeInstrumentationOnRequestError(err, {\n path: resource,\n method: req.method,\n headers: Object.fromEntries(req.headers.entries())\n }, {\n routerKind: 'Pages Router',\n routePath: '/middleware',\n routeType: 'middleware',\n revalidateReason: undefined\n });\n throw err;\n }\n };\n}\nexport default function nHandler(opts) {\n return adapter({\n ...opts,\n page,\n handler: errorHandledHandler(handler)\n });\n}\n\n//# sourceMappingURL=middleware.js.map\n","(()=>{\"use strict\";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n=\"~\";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!==\"function\"){throw new TypeError(\"The listener must be a function\")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t[\"default\"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t[\"default\"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name=\"TimeoutError\"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!==\"number\"||t<0){throw new TypeError(\"Expected `milliseconds` to be a positive number\")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n===\"function\"){try{i(n())}catch(e){s(e)}return}const r=typeof n===\"string\"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel===\"function\"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports[\"default\"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};(()=>{var e=n;Object.defineProperty(e,\"__esModule\",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap===\"number\"&&e.intervalCap>=1)){throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:\"\"}\\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:\"\"}\\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit(\"active\");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e===\"number\"&&e>=1)){throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit(\"add\")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e[\"default\"]=PQueue})();module.exports=n})();","module.exports = require(\"node:buffer\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n getTestReqInfo: null,\n withRequest: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n getTestReqInfo: function() {\n return getTestReqInfo;\n },\n withRequest: function() {\n return withRequest;\n }\n});\nconst _nodeasync_hooks = require(\"node:async_hooks\");\nconst testStorage = new _nodeasync_hooks.AsyncLocalStorage();\nfunction extractTestInfoFromRequest(req, reader) {\n const proxyPortHeader = reader.header(req, 'next-test-proxy-port');\n if (!proxyPortHeader) {\n return undefined;\n }\n const url = reader.url(req);\n const proxyPort = Number(proxyPortHeader);\n const testData = reader.header(req, 'next-test-data') || '';\n return {\n url,\n proxyPort,\n testData\n };\n}\nfunction withRequest(req, reader, fn) {\n const testReqInfo = extractTestInfoFromRequest(req, reader);\n if (!testReqInfo) {\n return fn();\n }\n return testStorage.run(testReqInfo, fn);\n}\nfunction getTestReqInfo(req, reader) {\n const testReqInfo = testStorage.getStore();\n if (testReqInfo) {\n return testReqInfo;\n }\n if (req && reader) {\n return extractTestInfoFromRequest(req, reader);\n }\n return undefined;\n}\n\n//# sourceMappingURL=context.js.map","/**\n * @license React\n * react.react-server.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar ReactSharedInternals = { H: null, A: null };\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty,\n assign = Object.assign;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n formatProdErrorMessage(\n 31,\n \"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array\n )\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nfunction createCacheRoot() {\n return new WeakMap();\n}\nfunction createCacheNode() {\n return { s: 0, v: void 0, o: null, p: null };\n}\nexports.Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children)) throw Error(formatProdErrorMessage(143));\n return children;\n }\n};\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.cache = function (fn) {\n return function () {\n var dispatcher = ReactSharedInternals.A;\n if (!dispatcher) return fn.apply(null, arguments);\n var fnMap = dispatcher.getCacheForType(createCacheRoot);\n dispatcher = fnMap.get(fn);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));\n fnMap = 0;\n for (var l = arguments.length; fnMap < l; fnMap++) {\n var arg = arguments[fnMap];\n if (\n \"function\" === typeof arg ||\n (\"object\" === typeof arg && null !== arg)\n ) {\n var objectCache = dispatcher.o;\n null === objectCache && (dispatcher.o = objectCache = new WeakMap());\n dispatcher = objectCache.get(arg);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher));\n } else\n (objectCache = dispatcher.p),\n null === objectCache && (dispatcher.p = objectCache = new Map()),\n (dispatcher = objectCache.get(arg)),\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()),\n objectCache.set(arg, dispatcher));\n }\n if (1 === dispatcher.s) return dispatcher.v;\n if (2 === dispatcher.s) throw dispatcher.v;\n try {\n var result = fn.apply(null, arguments);\n fnMap = dispatcher;\n fnMap.s = 1;\n return (fnMap.v = result);\n } catch (error) {\n throw ((result = dispatcher), (result.s = 2), (result.v = error), error);\n }\n };\n};\nexports.cacheSignal = function () {\n var dispatcher = ReactSharedInternals.A;\n return dispatcher ? dispatcher.cacheSignal() : null;\n};\nexports.captureOwnerStack = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(formatProdErrorMessage(267, element));\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useDebugValue = function () {};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.version = \"19.2.0-canary-0bdb9206-20250818\";\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1;\n }\n if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n cookiesSeparatorFound = true;\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n constructor(requestHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n this._headers = requestHeaders;\n const header = requestHeaders.get(\"cookie\");\n if (header) {\n const parsed = parseCookie(header);\n for (const [name, value] of parsed) {\n this._parsed.set(name, { name, value });\n }\n }\n }\n [Symbol.iterator]() {\n return this._parsed[Symbol.iterator]();\n }\n /**\n * The amount of cookies received from the client\n */\n get size() {\n return this._parsed.size;\n }\n get(...args) {\n const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(name);\n }\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed);\n if (!args.length) {\n return all.map(([_, value]) => value);\n }\n const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter(([n]) => n === name).map(([_, value]) => value);\n }\n has(name) {\n return this._parsed.has(name);\n }\n set(...args) {\n const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n const map = this._parsed;\n map.set(name, { name, value });\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n );\n return this;\n }\n /**\n * Delete the cookies matching the passed name or names in the request.\n */\n delete(names) {\n const map = this._parsed;\n const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n );\n return result;\n }\n /**\n * Delete all the cookies in the cookies in the request.\n */\n clear() {\n this.delete(Array.from(this._parsed.keys()));\n return this;\n }\n /**\n * Format the cookies in the request as a string for logging\n */\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n constructor(responseHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n var _a, _b, _c;\n this._headers = responseHeaders;\n const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n for (const cookieString of cookieStrings) {\n const parsed = parseSetCookie(cookieString);\n if (parsed)\n this._parsed.set(parsed.name, parsed);\n }\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n */\n get(...args) {\n const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(key);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n */\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed.values());\n if (!args.length) {\n return all;\n }\n const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter((c) => c.name === key);\n }\n has(name) {\n return this._parsed.has(name);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n */\n set(...args) {\n const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n const map = this._parsed;\n map.set(name, normalizeCookie({ name, value, ...cookie }));\n replace(map, this._headers);\n return this;\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n */\n delete(...args) {\n const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n }\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n }\n};\nfunction replace(bag, headers) {\n headers.delete(\"set-cookie\");\n for (const [, value] of bag) {\n const serialized = stringifyCookie(value);\n headers.append(\"set-cookie\", serialized);\n }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n if (typeof cookie.expires === \"number\") {\n cookie.expires = new Date(cookie.expires);\n }\n if (cookie.maxAge) {\n cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n }\n if (cookie.path === null || cookie.path === void 0) {\n cookie.path = \"/\";\n }\n return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestCookies,\n ResponseCookies,\n parseCookie,\n parseSetCookie,\n stringifyCookie\n});\n","(()=>{var i={226:function(i,e){(function(o,a){\"use strict\";var r=\"1.0.35\",t=\"\",n=\"?\",s=\"function\",b=\"undefined\",w=\"object\",l=\"string\",d=\"major\",c=\"model\",u=\"name\",p=\"type\",m=\"vendor\",f=\"version\",h=\"architecture\",v=\"console\",g=\"mobile\",k=\"tablet\",x=\"smarttv\",_=\"wearable\",y=\"embedded\",q=350;var T=\"Amazon\",S=\"Apple\",z=\"ASUS\",N=\"BlackBerry\",A=\"Browser\",C=\"Chrome\",E=\"Edge\",O=\"Firefox\",U=\"Google\",j=\"Huawei\",P=\"LG\",R=\"Microsoft\",M=\"Motorola\",B=\"Opera\",V=\"Samsung\",D=\"Sharp\",I=\"Sony\",W=\"Viera\",F=\"Xiaomi\",G=\"Zebra\",H=\"Facebook\",L=\"Chromium OS\",Z=\"Mac OS\";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]=\"iPad\";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!=\"Unknown\"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if(\"object\"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window===\"object\"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var o=__nccwpck_require__(226);module.exports=o})();","module.exports = require(\"node:async_hooks\");","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var r=e;\n/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function parse(e,r){if(typeof e!==\"string\"){throw new TypeError(\"argument str must be a string\")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn));\n}\n\n//# sourceMappingURL=server-edge.js.map","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.react-server.production.js');\n} else {\n module.exports = require('./cjs/react.react-server.development.js');\n}\n","(()=>{\"use strict\";var e={491:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i=\"context\";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c=\"diag\";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)(\"diag\");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r===\"number\"){r={logLevel:r}}const u=(0,i.getGlobal)(\"diag\");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:\"\";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)(\"diag\",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy(\"verbose\");e.debug=_logProxy(\"debug\");e.info=_logProxy(\"info\");e.warn=_logProxy(\"warn\");e.error=_logProxy(\"error\")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i=\"metrics\";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u=\"propagation\";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s=\"trace\";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)(\"OpenTelemetry Baggage Key\");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol(\"BaggageEntryMetadata\")},369:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!==\"string\"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=\"\"}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||\"DiagComponentLogger\"}debug(...e){return logProxy(\"debug\",this._namespace,e)}error(...e){return logProxy(\"error\",this._namespace,e)}info(...e){return logProxy(\"info\",this._namespace,e)}warn(...e){return logProxy(\"warn\",this._namespace,e)}verbose(...e){return logProxy(\"verbose\",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)(\"diag\");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:\"error\",c:\"error\"},{n:\"warn\",c:\"warn\"},{n:\"info\",c:\"info\"},{n:\"debug\",c:\"debug\"},{n:\"verbose\",c:\"trace\"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!==\"function\"){r=console.log}if(typeof r===\"function\"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,\"__esModule\",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a===\"function\"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc(\"error\",n.DiagLogLevel.ERROR),warn:_filterFunc(\"warn\",n.DiagLogLevel.WARN),info:_filterFunc(\"info\",n.DiagLogLevel.INFO),debug:_filterFunc(\"debug\",n.DiagLogLevel.DEBUG),verbose:_filterFunc(\"verbose\",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"ERROR\"]=30]=\"ERROR\";e[e[\"WARN\"]=50]=\"WARN\";e[e[\"INFO\"]=60]=\"INFO\";e[e[\"DEBUG\"]=70]=\"DEBUG\";e[e[\"VERBOSE\"]=80]=\"VERBOSE\";e[e[\"ALL\"]=9999]=\"ALL\"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(\".\")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ValueType=void 0;var r;(function(e){e[e[\"INT\"]=0]=\"INT\";e[e[\"DOUBLE\"]=1]=\"DOUBLE\"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis===\"object\"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e===\"object\"&&typeof e[\"spanId\"]===\"string\"&&typeof e[\"traceId\"]===\"string\"&&typeof e[\"traceFlags\"]===\"number\"}},124:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e[\"NOT_RECORD\"]=0]=\"NOT_RECORD\";e[e[\"RECORD\"]=1]=\"RECORD\";e[e[\"RECORD_AND_SAMPLED\"]=2]=\"RECORD_AND_SAMPLED\"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)(\"OpenTelemetry Context Key SPAN\");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=\",\";const c=\"=\";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.validateValue=t.validateKey=void 0;const r=\"[_0-9a-z-*/]\";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID=\"0000000000000000\";t.INVALID_TRACEID=\"00000000000000000000000000000000\";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanKind=void 0;var r;(function(e){e[e[\"INTERNAL\"]=0]=\"INTERNAL\";e[e[\"SERVER\"]=1]=\"SERVER\";e[e[\"CLIENT\"]=2]=\"CLIENT\";e[e[\"PRODUCER\"]=3]=\"PRODUCER\";e[e[\"CONSUMER\"]=4]=\"CONSUMER\"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e[\"UNSET\"]=0]=\"UNSET\";e[e[\"OK\"]=1]=\"OK\";e[e[\"ERROR\"]=2]=\"ERROR\"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"SAMPLED\"]=1]=\"SAMPLED\"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.VERSION=void 0;t.VERSION=\"1.6.0\"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var r={};(()=>{var e=r;Object.defineProperty(e,\"__esModule\",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,\"baggageEntryMetadataFromString\",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,\"createContextKey\",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,\"ROOT_CONTEXT\",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,\"DiagConsoleLogger\",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,\"DiagLogLevel\",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,\"createNoopMeter\",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,\"ValueType\",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,\"defaultTextMapGetter\",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,\"defaultTextMapSetter\",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,\"ProxyTracer\",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,\"ProxyTracerProvider\",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,\"SamplingDecision\",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,\"SpanKind\",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,\"SpanStatusCode\",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,\"TraceFlags\",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,\"createTraceState\",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,\"isSpanContextValid\",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,\"isValidTraceId\",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,\"isValidSpanId\",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,\"INVALID_SPANID\",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,\"INVALID_TRACEID\",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,\"INVALID_SPAN_CONTEXT\",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,\"context\",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,\"diag\",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,\"metrics\",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,\"propagation\",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,\"trace\",{enumerable:true,get:function(){return C.trace}});e[\"default\"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale","removeTrailingSlash","route","replace","parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice","addPathPrefix","prefix","startsWith","addPathSuffix","suffix","pathHasPrefix","addLocale","ignorePrefix","lower","formatNextPathnameInfo","info","buildId","trailingSlash","basePath","endsWith","getHostname","parsed","headers","host","Array","isArray","toString","cache","WeakMap","normalizeLocalePath","lowercasedLocales","get","map","set","segments","segment","index","length","removePathPrefix","withoutPrefix","getNextPathnameInfo","options","i18n","nextConfig","pathnameNoDataPrefix","paths","join","parseData","result","i18nProvider","analyze","parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","getRelativeURL","RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","ensureLeadingSlash","isGroupSegment","isParallelRouteSegment","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY","normalizeAppPath","reduce","normalizeRscURL","isThenable","promise","then","InvariantError","Error","constructor","message","name","tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","LRUCache","memoryCache","entry","size","pendingSets","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","DefaultCacheHandler","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","revalidate","returnStream","newSaved","value","tee","expire","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","expireTags","round","DYNAMIC_ERROR_CODE","DynamicServerError","description","digest","isDynamicServerError","NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","code","isStaticGenBailoutError","error","BAILOUT_TO_CSR","BailoutToCSRError","reason","isBailoutToCSRError","React","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","postponeWithTracking","dynamicTracking","dynamicUsageDescription","dynamicUsageStack","stack","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","createPrerenderInterruptedError","controller","abort","push","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","isDynamicPostponeReason","NEXT_PRERENDER_INTERRUPTED","isPrerenderInterruptedError","accessedDynamicData","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","line","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","constructorOpt","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","rootTaskSpawnPhase","throwForMissingRequestStore","makeDevtoolsIOAwarePromise","connection","callingExpression","phase","isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set","actionAsyncStorage","warnOnce","CachedParams","unstable_rootParams","createPrerenderRootParams","rootParams","underlyingParams","exportName","key","has","cachedParams","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","defineProperty","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","createPrerenderRootParamPromise","makeErroringRootParamPromise","NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","getClientIp","request","trim","checkRateLimitLocal","windowMs","Date","timestamps","t","allowed","remaining","reset","ceil","middleware","nextUrl","next","ip","useRedis","REDIS_URL","COSMIC_REDIS_ENABLED","status","String","response","config","matcher","HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","httpStatus","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","errorCode","destination","at","statusCode","isNaN","isNextRouterError"],"mappings":"8GACA,OAAA,cAAA,CAAA,EAAA,aAA6C,CAC7C,MAAA,CAAA,CACA,CAAC,EAAC,CAMF,AAMA,SANA,CAAA,CAAA,CAAA,EACA,IAAA,IAAA,KAAA,EAAA,OAAA,cAAA,CAAA,EAAA,EAAA,CACA,WAAA,CAAA,EACA,IAAA,CAAA,CAAA,EAAA,AACA,CAAK,CACL,EACA,EAAA,CACA,YAAA,WACA,OAAA,CACA,CAAK,CACL,eAAA,WACA,OAAA,CACA,CAAK,CACL,OAAA,WACA,OAAA,CACA,CACA,CAAC,EACD,IAAA,EAAiB,EAAQ,GAAW,EACpC,EAAA,CACA,IAAA,GACA,EAAA,AAHwB,GAGxB,CAEA,OAAA,CAAA,EAAA,IACA,EAAA,OAAA,CAAA,GAAA,CAAA,EAEA,EAkBA,eAAA,EAAA,CAAA,CAAA,CAAA,EACA,GAAA,KAAY,CAAA,CAAA,OAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,MAAA,CAAA,CAAA,YAAA,CAAA,CAAA,UAAA,CAAA,CAAA,KAAA,CAAA,CAAA,SAAA,CAAA,CAAA,SAAA,CAAA,CAAA,eAAA,CAAA,CAAA,CAAsG,EAClH,MAAA,CACA,SAAA,EACA,IAAA,QACA,QAAA,CACA,IAAA,EACA,OAAA,EACA,QAAA,IACA,MAAA,IAAA,CAAA,GACA,CACA,kBACA,AA7BA,WACA,IAAA,EAAA,CAAA,QAAA,KAAA,EAAA,EAAA,EAAA,KAAA,CAAA,MAEA,IAAA,IAAA,EAAA,EAAmB,EAAA,EAAA,MAAA,CAAkB,IACrC,GAAA,CAAA,CAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAC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WAA+B,OAAA,EAAA,OAAA,CAAA,CAAkB,EAAE,IAAA,EAAA,EAAA,KAAiC,OAAA,cAAA,CAA5kH,EAA4kH,cAAA,CAAuC,WAAA,CAAA,EAAA,IAAA,WAA+B,OAAA,EAAA,WAAA,CAAA,CAAsB,EAAE,IAAA,EAAA,EAAA,KAAiC,OAAA,cAAA,CAA3sH,EAA2sH,QAAA,CAAiC,WAAA,CAAA,EAAA,IAAA,WAA+B,OAAA,EAAA,KAAA,CAAA,CAAgB,EAAE,AAA7xH,EAA6xH,OAAA,CAAA,CAAc,QAAA,EAAA,OAAA,CAAA,KAAA,EAAA,IAAA,CAAA,QAAA,EAAA,OAAA,CAAA,YAAA,EAAA,WAAA,CAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAyF,GAAI,EAAA,OAAA,CAAA,CAAA,CAAA,CAAiB"}{"version":3,"file":"x","mappings":";;;;;;;AAAa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAIL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,GAAW;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sGAAsG;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC,+BAA+B,MAAM;AACrC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA,yDAAyD,UAAU;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uEAAuE,YAAY;AACnF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,4EAA4E,gBAAgB,EAAE,YAAY;AAC1G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAM;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAM;AACd;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;AC7IO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mFAAmF,YAAY;AAC/F;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,uBAAuB;AACvB;AACA,KAAK;AACL;AACA;AACA,QAAQ,KAAmC,EAAE,EAExC;AACL;AACA,oBAAoB,qBAAM;AAC1B;AACA,sBAAsB,qBAAM;AAC5B,QAAQ,qBAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;;AAEA;;ACrGO;AACP,kBAAkB,MAAM;AACxB,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC3BO;AACA,6CAA6C;AAC7C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACO;AACA;AACA;AACA;AACP;AACO;AACP;AACA;AACA;AACO;AACP;AACO;AACA,mCAAmC,4DAAY,oBAAoB,CAAC;AAC3E;AACO;AACP;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+NAA+K;AACtN,uCAAuC,qJAAqG;AAC5I,6CAA6C,yIAAyF;AACtI,kCAAkC,wKAAwH;AAC1J,mDAAmD,yJAAyG;AAC5J,kCAAkC,yKAAyH;AAC3J;AACA;AACA,yCAAyC,yJAAyG;AAClJ,oCAAoC,0MAA0J;AAC9L,8BAA8B,mQAAmN;AACjP,kCAAkC,0MAA0J;AAC5L,4BAA4B;AACnC;AACA;AACA;AACA;AACA;AACA,CAAC;AACM;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD;;ACvK+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,yDAAyD;AACzD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA,MAAM;AACN,mEAAmE,YAAY;AAC/E;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA,QAAQ,uBAAuB;AAC/B,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AChJ8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gHAAgH;AAChH;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;ACzEO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC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EAAE;YAC1CgC,SAASP,QAAQQ,YAAY,GACzBR,QAAQQ,YAAY,CAACC,OAAO,CAACN,wBAC7Bf,mBAAmBA,CAACe,sBAAsBF,KAAKvD,OAAO;YAE1D,IAAI6D,OAAOpE,cAAc,EAAE;gBACzBmC,KAAK1B,MAAM,GAAG2D,OAAOpE,cAAc;YACrC;QACF;IACF;IACA,OAAOmC;AACT;;;AC9GgF;AACiB;AACrC;AAC+B;AAC3F,qGAAqG,EAAE;AACvG;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA,wBAAwB,SAA8C;AACtE;AACA,SAAS;AACT,yBAAyB,WAAW;AACpC,+IAA+I,kBAAkB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;ACxL4G;;AAE5G;;ACFsC;AAC4B;AACN;AACjB;AACpC;AACP;AACA;AACA;AACA;AACA,IAAW;AACX,gCAAgC;AAChC;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA;AACA,YAAY,KAAmC,EAAE,EAIxC;AACT;AACA;AACA,4BAA4B,OAAO;AACnC,qBAAqB,yBAAyB;AAC9C;AACA,SAAS;AACT;AACA,yBAAyB,oCAAc;AACvC;AACA,iBAAiB,MAA8C,GAAG,CAAG;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;;AAEA;;AChFO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACnBmE;AAC7B;AAC4B;AACd;AACR;AAC5C,MAAM,kBAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX,+BAA+B;AAC/B;AACA;AACA,4BAA4B,qCAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,qCAAe;AACrE,yGAAyG,yCAAe;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT,aAAa,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M,CAAC,CAAC3F,UAAUoC,SAASC,OAAOF;QACjD,8BAA8B;QAC9B,IAAI,CAACC,SAAS;YACZ,OAAOpC;QACT;QAEA,sBAAsB;QACtB,IAAI+E,cAAcA,CAAC3C,UAAU;YAC3B,OAAOpC;QACT;QAEA,iCAAiC;QACjC,IAAIoC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOpC;QACT;QAEA,uDAAuD;QACvD,IACGoC,CAAAA,YAAY,UAAUA,YAAY,QAAM,IACzCC,UAAUF,SAASG,MAAM,GAAG,GAC5B;YACA,OAAOtC;QACT;QAEA,OAAUA,WAAS,MAAGoC;IACxB,GAAG;AAEP;AAEA;;;CAGC,GACM,SAASwD,gBAAgBvC,GAAW;IACzC,OAAOA,IAAI5D,OAAO,CAChB,eACA;AAGJ;;;AC/D2C;AAC3C;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,aAAa;AACb;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC3KA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2CAAuB;AACvC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AChDgE;AACzD,iCAAiC,2CAAuB;;AAE/D;;ACHA;AAGE;AACsD;;AAExD;;ACN4C;AACC;AACF;AACwC;AACnF;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,qCAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qCAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,+CAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA,CAAC,iBAAiB;AAClB,IAAI,kBAAQ;AACZ;AACA;AACA,CAAC,CAAC,kBAAQ,MAAM;AAChB;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACsN;;AAEtN;;ACvIA;;;;;CAKC,GACM,SAASoG,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B;;;ACfyE;AACZ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAmC;AACvC,UAAU,mBAAO,CAAC,GAAoB;AACtC,EAAE,KAAK,EAMN;AACD,QAAQ,sEAAsE;AACvE;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B,QAAQ,oFAAoF;AACxK;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAS;AACf;AACA;AACA,CAAC;AAC8C;;AAE/C;;ACvOwE;AACsC;AAC9D;AACE;AAC3C;AACP;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP,oBAAoB,cAAc;AAClC,sCAAsC,2BAA2B;AACjE;AACA,gDAAgD,0CAA0C;AAC1F;AACA;AACA;AACA;AACA;AACO;AACA;AACA,+BAA+B,+DAAe;AAC9C;AACA;AACA,2CAA2C;AAClD;AACA;AACA;AACA,YAAY,YAAY,EAAE,mBAAO,CAAC,GAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA;AACA,cAAc;AACd,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW,uBAAuB,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEA;;AC3JuF;AAChF;AACP;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E,wDAAwD,4BAA4B;AACpF;AACA,QAAQ,MAAqC,IAAI,CAA+C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,sBAAsB,KAAsC,YAAY,CAAK;AAC7E,oBAAoB,YAAoB;AACxC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;ACnD4E;AACJ;AACmH;AAC3G;AACtB;AACR;AAClD;AACA,oBAAoB,cAAc;AAClC,yBAAyB,cAAc;AACvC;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA,wBAAwB,oCAAc,CAAC,cAAc;AACrD,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA,oCAAoC,qCAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AAC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ASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;ACRA;AAGE;AACwF;AACxB;AACF;AACzD,SAAS,4DAA2B;AAC3C,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uDAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;AD1LO,MAAMJ,kCAAcA,SAASC;IAClCC,YAAYC,OAAe,EAAEzD,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAayD,CAAAA,QAAQ/E,QAAQ,CAAC,OAAO+E,UAAUA,UAAU,IAAE,GAAE,8BAC9DzD;QAEF,IAAI,CAAC0D,IAAI,GAAG;IACd;AACF;;;AERA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACnMA,+EAA+E;AAC/E,qBAAqB;AACd,MAAMC,eAAe,IAAIC,MAAqB;AAE9C,MAAMC,UAAU,CAACC,MAAgBC;IACtC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AAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,IAAI,cAAK,oBAAoB,cAAK;AAClC;AACA;AACA;;AAEA;;AC1GwD;AACxD,qFAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACjEA,MAAM,4DAAwC;AAC9C;AACA;AACA;AACA,CAAC;AACD,MAAM,yCAAqB;AAC3B;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA,cAAc,4DAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,MAAM,gDAA4B;AAC3B,SAAS,sDAAuB;AACvC,QAAQ,gDAA4B;AACpC,mBAAmB,gDAA4B;AAC/C;AACA,eAAe,yCAAqB;AACpC;AACO,SAAS,gCAAY;AAC5B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA,WAAW,yCAAqB;AAChC;AACO,SAAS,kCAAc;AAC9B,QAAQ,gDAA4B;AACpC,eAAe,gDAA4B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;;AChDgE;AACzD,sCAAsC,sDAAuB;;AAEpE;;ACHA;AAGE;AAC+B;;AAEjC;;ACNsD;AACY;AACR;AACmB;AACd;AACE;AACqB;AACE;AACjF;AACP,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA,iCAAiC,mBAAY;AAC7C;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAAoB;AAClD;AACA;AACA;AACA,+BAA+B,6BAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAY;AAC5C;AACA,sBAAsB,6BAAqB;AAC3C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAgB;AAC1C;AACA,4CAA4C,kCAAc;AAC1D;AACA;AACA;AACA,aAAa;AACb;AACA,eAAe,sBAAsB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,wDAAwD,kCAAc;AACtE;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AC1HA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;AAEA;;AC3BsD;AACqB;AACrB;AACS;AACI;AAC5D,2BAA2B,yEAAyE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kCAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD,eAAe,YAAY;AAC3B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;;AAEA;;AClFA;AACA;AACA,GAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yDAAyD,UAAU,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC5DA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;ACZ4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AClBiE;AACF;AACd;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,sCAAsC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B,CAAC,EAAE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B,CAAC,EAAE,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AC5DA;AACA;AACA,kCAAkC;AAClC,IAAW;AACX;AACA;;AAEA;;ACP6C;AACkC;AACa;AACrC;AACE;AACuC;AAC3D;AACyB;AACY;AAC6F;AAC3G;AACc;AACY;AACxB;AACe;AACY;AACzC;AACQ;AACP;AACc;AACa;AACrB;AACI;AACpD,8BAA8B,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D,YAAY,mBAAO,CAAC,GAA6C;AACjE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA,yBAAyB,eAAe;AACxC,gFAAgF,OAAO;AACvF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA,yBAAyB,kBAAkB,oBAAoB,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAA8C,GAAG,CAA2B;AACrG,kDAAkD,oBAAoB;AACtE;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAoB;AAC7C,iCAAiC,EAAyC;AAC1E,iBAAiB,YAAoB;AACrC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,qCAAqC;AACrC;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qFAAqF,wBAAwB;AAC7G,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD,mBAAmB,gBAAS,SAAS,cAAc;AACnD,wCAAwC,gBAAgB,EAAE,yBAAyB;AACnF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D,yCAAyC,wBAAwB;AACjE,sCAAsC,eAAe;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,yBAAyB;AACzB,+DAA+D,2BAA2B;AAC1F;AACA;AACA,qBAAqB;AACrB,iCAAiC,wBAAgB,oBAAoB,4BAAoB;AACzF,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,SAAS;AACT,YAAY,KAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC,EAAE,gBAAgB;AACzE;AACA;AACA;AACA,UAAU,MAAsD,IAAI,CAA0C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA,qCAAqC,2BAA2B;AAChE;AACA;AACA;AAC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ACA;AACA,CAAC;AACD,yBAAyB,mBAAO,CAAC,GAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;AACb,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,yBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yBAAgB;AAChB,yBAAgB;AAChB,yBAAkB;AAClB,yBAAgB;AAChB,yBAAuE;AACvE;AACA,yBAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yBAAmB;AACnB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAoB;AACpB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA,yBAAqB;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oBAAoB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAiB;AACjB,WAAW;AACX;AACA,yBAAkB;AAClB,WAAW;AACX;AACA,yBAAsB;AACtB,yBAAY;AACZ;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA,yBAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,yBAAW;AACX;AACA;AACA,yBAAmB;AACnB;AACA;AACA,yBAAqB;AACrB,yBAAa;AACb;AACA;AACA,yBAAe;AACf;AACA;AACA,yBAAe;;;;;;;;;ACtaF;AACb;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA,6BAA6B,4FAA4F;AACzH;AACA;AACA;AACA,oDAAoD,kBAAkB,aAAa;;AAEnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C,mEAAmE,gFAAgF;AACnJ,gEAAgE,SAAS;AACzE,2CAA2C,SAAS;AACpD;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA,iDAAiD,WAAW;AAC5D;AACA,yBAAyB,OAAO,GAAG,qDAAqD;AACxF,+CAA+C,cAAc,EAAE,cAAc,GAAG;AAChF;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD,qBAAqB,gBAAgB;AACrC,uCAAuC,wBAAwB;AAC/D;AACA,qBAAqB,mCAAmC;AACxD,mBAAmB,cAAc;AACjC,qBAAqB,mCAAmC;AACxD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA,4EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iDAAiD;AAC9E;AACA;AACA,oDAAoD,OAAO,GAAG,4BAA4B,WAAW;AACrG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4EAA4E;AAClF;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA,sBAAsB,mEAAmE;AACzF;AACA;AACA,8BAA8B,iDAAiD;AAC/E;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA;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,wBAAwB,EAAE,+BAA+B,0CAA0C,+BAA+B,yBAAyB,EAAE,2CAA2C,+BAA+B,0BAA0B,EAAE,gDAAgD,+BAA+B,+BAA+B,EAAE,gCAAgC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,gCAAgC,+BAA+B,eAAe,EAAE,iCAAiC,mCAAmC,+BAA+B,kBAAkB,EAAE,iCAAiC,uCAAuC,+BAA+B,sBAAsB,EAAE,iCAAiC,iCAAiC,+BAA+B,gBAAgB,EAAE,cAAc,yFAAyF,IAAI,iBAAiB","sources":["webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/fetch.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/globals.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/error.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/constants.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/utils.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js|middleware","webpack://../../../../src/shared/lib/i18n/detect-domain-locale.ts","webpack://../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts","webpack://../../../../../src/shared/lib/router/utils/parse-path.ts","webpack://../../../../../src/shared/lib/router/utils/add-path-prefix.ts","webpack://../../../../../src/shared/lib/router/utils/add-path-suffix.ts","webpack://../../../../../src/shared/lib/router/utils/path-has-prefix.ts","webpack://../../../../../src/shared/lib/router/utils/add-locale.ts","webpack://../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts","webpack://../../../src/shared/lib/get-hostname.ts","webpack://../../../../src/shared/lib/i18n/normalize-locale-path.ts","webpack://../../../../../src/shared/lib/router/utils/remove-path-prefix.ts","webpack://../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/next-url.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/cookies.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/request.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/response.js|middleware","webpack://../../../../../src/shared/lib/router/utils/relativize-url.ts","webpack://../../../src/client/components/app-router-headers.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/internal-utils.js|middleware","webpack://../../../../src/shared/lib/page-path/ensure-leading-slash.ts","webpack://../../../src/shared/lib/segment.ts","webpack://../../../../../src/shared/lib/router/utils/app-paths.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js|middleware","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/async-local-storage.js|shared","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/constants.js|middleware","webpack://../../../src/shared/lib/is-thenable.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/trace/tracer.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/api-utils/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/request-store.js|middleware","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js|shared","webpack://../../../src/shared/lib/invariant-error.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lru-cache.js|middleware","webpack://../../../../src/server/lib/incremental-cache/tags-manifest.external.ts","webpack://../../../../src/server/lib/cache-handlers/default.external.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/use-cache/handlers.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/revalidation-utils.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/async-local-storage.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after-context.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/lazy-result.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/async-storage/work-store.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/web-on-close.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/get-edge-preview-props.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/builtin-request-context.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/implicit-tags.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/lib/is-rsc-request.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/adapter.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/after.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/after/index.js|middleware","webpack://../../../src/client/components/hooks-server-context.ts","webpack://../../../src/client/components/static-generation-bailout.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/dynamic-rendering-utils.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/framework/boundary-constants.js|middleware","webpack://../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts","webpack://../../../src/server/app-render/dynamic-rendering.ts","webpack://../../../src/server/request/utils.ts","webpack://../../../src/server/request/connection.ts","webpack://../../../../src/shared/lib/utils/reflect-utils.ts","webpack://javascript/auto|./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js|shared","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/lib/picocolors.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/build/output/log.js|middleware","webpack://../../../src/server/request/root-params.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/server/web/exports/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/esm/api/server.js|middleware","webpack://./src/middleware.js","webpack://../../../../src/client/components/http-access-fallback/http-access-fallback.ts","webpack://../../../src/client/components/redirect-status-code.ts","webpack://../../../src/client/components/redirect-error.ts","webpack://../../../src/client/components/is-next-router-error.ts","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fsrc%2Fmiddleware.js&page=%2Fsrc%2Fmiddleware&rootDir=C%3A%5CUsers%5Cabd_b%5COneDrive%5CDesktop%5CCOSMIC%20AI-Risk%20Dashboard%5CStep%2012%20is%20complete%20Final%20QA%2C%20Demo%20Readiness%2C%20and%20Submission%20Freeze%5Capplication%5Csaas-app&matchers=W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV0%3D&preferredRegion=&middlewareConfig=eyJtYXRjaGVycyI6W3sicmVnZXhwIjoiXig%2FOlxcLyhfbmV4dFxcL2RhdGFcXC9bXi9dezEsfSkpP1xcL2FwaSg%2FOlxcLygoPzpbXlxcLyNcXD9dKz8pKD86XFwvKD86W15cXC8jXFw%2FXSs%2FKSkqKSk%2FKFxcLmpzb258XFwucnNjfFxcLnNlZ21lbnRzXFwvLitcXC5zZWdtZW50XFwucnNjKT9bXFwvI1xcP10%2FJCIsIm9yaWdpbmFsU291cmNlIjoiL2FwaS86cGF0aCoifV19!|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/p-queue/index.js|middleware","external commonjs \"node:buffer\"","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/context.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js|middleware","external commonjs \"node:async_hooks\"","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/cookie/index.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/experimental/testmode/server-edge.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/react/react.react-server.js|middleware","webpack://javascript/auto|./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[21].oneOf[2].use[1]!./node_modules/next/dist/compiled/@opentelemetry/api/index.js|middleware"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n handleFetch: null,\n interceptFetch: null,\n reader: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n handleFetch: function() {\n return handleFetch;\n },\n interceptFetch: function() {\n return interceptFetch;\n },\n reader: function() {\n return reader;\n }\n});\nconst _context = require(\"./context\");\nconst reader = {\n url (req) {\n return req.url;\n },\n header (req, name) {\n return req.headers.get(name);\n }\n};\nfunction getTestStack() {\n let stack = (new Error().stack ?? '').split('\\n');\n // Skip the first line and find first non-empty line.\n for(let i = 1; i < stack.length; i++){\n if (stack[i].length > 0) {\n stack = stack.slice(i);\n break;\n }\n }\n // Filter out franmework lines.\n stack = stack.filter((f)=>!f.includes('/next/dist/'));\n // At most 5 lines.\n stack = stack.slice(0, 5);\n // Cleanup some internal info and trim.\n stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim());\n return stack.join(' ');\n}\nasync function buildProxyRequest(testData, request) {\n const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request;\n return {\n testData,\n api: 'fetch',\n request: {\n url,\n method,\n headers: [\n ...Array.from(headers),\n [\n 'next-test-stack',\n getTestStack()\n ]\n ],\n body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null,\n cache,\n credentials,\n integrity,\n mode,\n redirect,\n referrer,\n referrerPolicy\n }\n };\n}\nfunction buildResponse(proxyResponse) {\n const { status, headers, body } = proxyResponse.response;\n return new Response(body ? Buffer.from(body, 'base64') : null, {\n status,\n headers: new Headers(headers)\n });\n}\nasync function handleFetch(originalFetch, request) {\n const testInfo = (0, _context.getTestReqInfo)(request, reader);\n if (!testInfo) {\n // Passthrough non-test requests.\n return originalFetch(request);\n }\n const { testData, proxyPort } = testInfo;\n const proxyRequest = await buildProxyRequest(testData, request);\n const resp = await originalFetch(`http://localhost:${proxyPort}`, {\n method: 'POST',\n body: JSON.stringify(proxyRequest),\n next: {\n // @ts-ignore\n internal: true\n }\n });\n if (!resp.ok) {\n throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), \"__NEXT_ERROR_CODE\", {\n value: \"E146\",\n enumerable: false,\n configurable: true\n });\n }\n const proxyResponse = await resp.json();\n const { api } = proxyResponse;\n switch(api){\n case 'continue':\n return originalFetch(request);\n case 'abort':\n case 'unhandled':\n throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), \"__NEXT_ERROR_CODE\", {\n value: \"E145\",\n enumerable: false,\n configurable: true\n });\n case 'fetch':\n return buildResponse(proxyResponse);\n default:\n return api;\n }\n}\nfunction interceptFetch(originalFetch) {\n global.fetch = function testFetch(input, init) {\n var _init_next;\n // Passthrough internal requests.\n // @ts-ignore\n if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) {\n return originalFetch(input, init);\n }\n return handleFetch(originalFetch, new Request(input, init));\n };\n return ()=>{\n global.fetch = originalFetch;\n };\n}\n\n//# sourceMappingURL=fetch.js.map","export async function getEdgeInstrumentationModule() {\n const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation;\n return instrumentation;\n}\nlet instrumentationModulePromise = null;\nasync function registerInstrumentation() {\n // Ensure registerInstrumentation is not called in production build\n if (process.env.NEXT_PHASE === 'phase-production-build') return;\n if (!instrumentationModulePromise) {\n instrumentationModulePromise = getEdgeInstrumentationModule();\n }\n const instrumentation = await instrumentationModulePromise;\n if (instrumentation == null ? void 0 : instrumentation.register) {\n try {\n await instrumentation.register();\n } catch (err) {\n err.message = `An error occurred while loading instrumentation hook: ${err.message}`;\n throw err;\n }\n }\n}\nexport async function edgeInstrumentationOnRequestError(...args) {\n const instrumentation = await getEdgeInstrumentationModule();\n try {\n var _instrumentation_onRequestError;\n await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args));\n } catch (err) {\n // Log the soft error and continue, since the original error has already been thrown\n console.error('Error in instrumentation.onRequestError:', err);\n }\n}\nlet registerInstrumentationPromise = null;\nexport function ensureInstrumentationRegistered() {\n if (!registerInstrumentationPromise) {\n registerInstrumentationPromise = registerInstrumentation();\n }\n return registerInstrumentationPromise;\n}\nfunction getUnsupportedModuleErrorMessage(module) {\n // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found\n return `The edge runtime does not support Node.js '${module}' module.\nLearn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;\n}\nfunction __import_unsupported(moduleName) {\n const proxy = new Proxy(function() {}, {\n get (_obj, prop) {\n if (prop === 'then') {\n return {};\n }\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n },\n construct () {\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n },\n apply (_target, _this, args) {\n if (typeof args[0] === 'function') {\n return args[0](proxy);\n }\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n });\n return new Proxy({}, {\n get: ()=>proxy\n });\n}\nfunction enhanceGlobals() {\n if (process.env.NEXT_RUNTIME !== 'edge') {\n return;\n }\n // The condition is true when the \"process\" module is provided\n if (process !== global.process) {\n // prefer local process but global.process has correct \"env\"\n process.env = global.process.env;\n global.process = process;\n }\n // to allow building code that import but does not use node.js modules,\n // webpack will expect this function to exist in global scope\n try {\n Object.defineProperty(globalThis, '__import_unsupported', {\n value: __import_unsupported,\n enumerable: false,\n configurable: false\n });\n } catch {}\n // Eagerly fire instrumentation hook to make the startup faster.\n void ensureInstrumentationRegistered();\n}\nenhanceGlobals();\n\n//# sourceMappingURL=globals.js.map","export class PageSignatureError extends Error {\n constructor({ page }){\n super(`The middleware \"${page}\" accepts an async API directly with the form:\n \n export function middleware(request, event) {\n return NextResponse.redirect('/new-location')\n }\n \n Read more: https://nextjs.org/docs/messages/middleware-new-signature\n `);\n }\n}\nexport class RemovedPageError extends Error {\n constructor(){\n super(`The request.page has been deprecated in favour of \\`URLPattern\\`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n `);\n }\n}\nexport class RemovedUAError extends Error {\n constructor(){\n super(`The request.ua has been removed in favour of \\`userAgent\\` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n `);\n }\n}\n\n//# sourceMappingURL=error.js.map","export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain';\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8';\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8';\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP';\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI';\nexport const MATCHED_PATH_HEADER = 'x-matched-path';\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate';\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated';\nexport const RSC_PREFETCH_SUFFIX = '.prefetch.rsc';\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments';\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc';\nexport const RSC_SUFFIX = '.rsc';\nexport const ACTION_SUFFIX = '.action';\nexport const NEXT_DATA_SUFFIX = '.json';\nexport const NEXT_META_SUFFIX = '.meta';\nexport const NEXT_BODY_SUFFIX = '.body';\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';\nexport const NEXT_RESUME_HEADER = 'next-resume';\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128;\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256;\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';\n// in seconds\nexport const CACHE_ONE_YEAR = 31536000;\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe;\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware';\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation';\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages';\nexport const DOT_NEXT_ALIAS = 'private-dot-next';\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir';\nexport const APP_DIR_ALIAS = 'private-next-app-dir';\nexport const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy';\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate';\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference';\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper';\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import';\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption';\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper';\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;\nexport const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?';\nexport const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?';\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\\n' + 'Please use `revalidate` instead.';\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;\nexport const ESLINT_DEFAULT_DIRS = [\n 'app',\n 'pages',\n 'components',\n 'lib',\n 'src'\n];\nexport const SERVER_RUNTIME = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs'\n};\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */ const WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */ shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */ reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */ serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */ actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */ apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */ apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */ middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */ instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */ edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */ appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */ pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */ pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */ pagesDirNode: 'pages-dir-node'\n};\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ]\n }\n};\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__'\n};\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES };\n\n//# sourceMappingURL=constants.js.map","import { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants';\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) {\n const headers = new Headers();\n for (let [key, value] of Object.entries(nodeHeaders)){\n const values = Array.isArray(value) ? value : [\n value\n ];\n for (let v of values){\n if (typeof v === 'undefined') continue;\n if (typeof v === 'number') {\n v = v.toString();\n }\n headers.append(key, v);\n }\n }\n return headers;\n}\n/*\n Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n that are within a single set-cookie field-value, such as in the Expires portion.\n This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n React Native's fetch does this for *every* header, including set-cookie.\n \n Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/ export function splitCookiesString(cookiesString) {\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while(pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))){\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== '=' && ch !== ';' && ch !== ',';\n }\n while(pos < cookiesString.length){\n start = pos;\n cookiesSeparatorFound = false;\n while(skipWhitespace()){\n ch = cookiesString.charAt(pos);\n if (ch === ',') {\n // ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while(pos < cookiesString.length && notSpecialChar()){\n pos += 1;\n }\n // currently special character\n if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n // we found cookies separator\n cookiesSeparatorFound = true;\n // pos is inside the next cookie, so back up and return it.\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n // in param ',' or param separator ';',\n // we continue from that comma\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */ export function toNodeOutgoingHttpHeaders(headers) {\n const nodeHeaders = {};\n const cookies = [];\n if (headers) {\n for (const [key, value] of headers.entries()){\n if (key.toLowerCase() === 'set-cookie') {\n // We may have gotten a comma joined string of cookies, or multiple\n // set-cookie headers. We need to merge them into one header array\n // to represent all the cookies.\n cookies.push(...splitCookiesString(value));\n nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies;\n } else {\n nodeHeaders[key] = value;\n }\n }\n }\n return nodeHeaders;\n}\n/**\n * Validate the correctness of a user-provided URL.\n */ export function validateURL(url) {\n try {\n return String(new URL(String(url)));\n } catch (error) {\n throw Object.defineProperty(new Error(`URL is malformed \"${String(url)}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {\n cause: error\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E61\",\n enumerable: false,\n configurable: true\n });\n }\n}\n/**\n * Normalizes `nxtP` and `nxtI` query param values to remove the prefix.\n * This function does not mutate the input key.\n */ export function normalizeNextQueryParam(key) {\n const prefixes = [\n NEXT_QUERY_PARAM_PREFIX,\n NEXT_INTERCEPTION_MARKER_PREFIX\n ];\n for (const prefix of prefixes){\n if (key !== prefix && key.startsWith(prefix)) {\n return key.substring(prefix.length);\n }\n }\n return null;\n}\n\n//# sourceMappingURL=utils.js.map","import { PageSignatureError } from '../error';\nconst responseSymbol = Symbol('response');\nconst passThroughSymbol = Symbol('passThrough');\nconst waitUntilSymbol = Symbol('waitUntil');\nclass FetchEvent {\n constructor(_request, waitUntil){\n this[passThroughSymbol] = false;\n this[waitUntilSymbol] = waitUntil ? {\n kind: 'external',\n function: waitUntil\n } : {\n kind: 'internal',\n promises: []\n };\n }\n // TODO: is this dead code? NextFetchEvent never lets this get called\n respondWith(response) {\n if (!this[responseSymbol]) {\n this[responseSymbol] = Promise.resolve(response);\n }\n }\n // TODO: is this dead code? passThroughSymbol is unused\n passThroughOnException() {\n this[passThroughSymbol] = true;\n }\n waitUntil(promise) {\n if (this[waitUntilSymbol].kind === 'external') {\n // if we received an external waitUntil, we delegate to it\n // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox`\n const waitUntil = this[waitUntilSymbol].function;\n return waitUntil(promise);\n } else {\n // if we didn't receive an external waitUntil, we make it work on our own\n // (and expect the caller to do something with the promises)\n this[waitUntilSymbol].promises.push(promise);\n }\n }\n}\nexport function getWaitUntilPromiseFromEvent(event) {\n return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined;\n}\nexport class NextFetchEvent extends FetchEvent {\n constructor(params){\n var _params_context;\n super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil);\n this.sourcePage = params.page;\n }\n /**\n * @deprecated The `request` is now the first parameter and the API is now async.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */ get request() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n /**\n * @deprecated Using `respondWith` is no longer needed.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */ respondWith() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n}\n\n//# sourceMappingURL=fetch-event.js.map","import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n","import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n","import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n","export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n","import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n","import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n","import { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale';\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info';\nimport { getHostname } from '../../shared/lib/get-hostname';\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info';\nconst REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\\/\\/)(127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)/;\nfunction parseURL(url, base) {\n return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'));\n}\nconst Internal = Symbol('NextURLInternal');\nexport class NextURL {\n constructor(input, baseOrOpts, opts){\n let base;\n let options;\n if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') {\n base = baseOrOpts;\n options = opts || {};\n } else {\n options = opts || baseOrOpts || {};\n }\n this[Internal] = {\n url: parseURL(input, base ?? options.base),\n options: options,\n basePath: ''\n };\n this.analyze();\n }\n analyze() {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1;\n const info = getNextPathnameInfo(this[Internal].url.pathname, {\n nextConfig: this[Internal].options.nextConfig,\n parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n i18nProvider: this[Internal].options.i18nProvider\n });\n const hostname = getHostname(this[Internal].url, this[Internal].options.headers);\n this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname);\n const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale);\n this[Internal].url.pathname = info.pathname;\n this[Internal].defaultLocale = defaultLocale;\n this[Internal].basePath = info.basePath ?? '';\n this[Internal].buildId = info.buildId;\n this[Internal].locale = info.locale ?? defaultLocale;\n this[Internal].trailingSlash = info.trailingSlash;\n }\n formatPathname() {\n return formatNextPathnameInfo({\n basePath: this[Internal].basePath,\n buildId: this[Internal].buildId,\n defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined,\n locale: this[Internal].locale,\n pathname: this[Internal].url.pathname,\n trailingSlash: this[Internal].trailingSlash\n });\n }\n formatSearch() {\n return this[Internal].url.search;\n }\n get buildId() {\n return this[Internal].buildId;\n }\n set buildId(buildId) {\n this[Internal].buildId = buildId;\n }\n get locale() {\n return this[Internal].locale ?? '';\n }\n set locale(locale) {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig;\n if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) {\n throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale \"${locale}\"`), \"__NEXT_ERROR_CODE\", {\n value: \"E597\",\n enumerable: false,\n configurable: true\n });\n }\n this[Internal].locale = locale;\n }\n get defaultLocale() {\n return this[Internal].defaultLocale;\n }\n get domainLocale() {\n return this[Internal].domainLocale;\n }\n get searchParams() {\n return this[Internal].url.searchParams;\n }\n get host() {\n return this[Internal].url.host;\n }\n set host(value) {\n this[Internal].url.host = value;\n }\n get hostname() {\n return this[Internal].url.hostname;\n }\n set hostname(value) {\n this[Internal].url.hostname = value;\n }\n get port() {\n return this[Internal].url.port;\n }\n set port(value) {\n this[Internal].url.port = value;\n }\n get protocol() {\n return this[Internal].url.protocol;\n }\n set protocol(value) {\n this[Internal].url.protocol = value;\n }\n get href() {\n const pathname = this.formatPathname();\n const search = this.formatSearch();\n return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`;\n }\n set href(url) {\n this[Internal].url = parseURL(url);\n this.analyze();\n }\n get origin() {\n return this[Internal].url.origin;\n }\n get pathname() {\n return this[Internal].url.pathname;\n }\n set pathname(value) {\n this[Internal].url.pathname = value;\n }\n get hash() {\n return this[Internal].url.hash;\n }\n set hash(value) {\n this[Internal].url.hash = value;\n }\n get search() {\n return this[Internal].url.search;\n }\n set search(value) {\n this[Internal].url.search = value;\n }\n get password() {\n return this[Internal].url.password;\n }\n set password(value) {\n this[Internal].url.password = value;\n }\n get username() {\n return this[Internal].url.username;\n }\n set username(value) {\n this[Internal].url.username = value;\n }\n get basePath() {\n return this[Internal].basePath;\n }\n set basePath(value) {\n this[Internal].basePath = value.startsWith('/') ? value : `/${value}`;\n }\n toString() {\n return this.href;\n }\n toJSON() {\n return this.href;\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n href: this.href,\n origin: this.origin,\n protocol: this.protocol,\n username: this.username,\n password: this.password,\n host: this.host,\n hostname: this.hostname,\n port: this.port,\n pathname: this.pathname,\n search: this.search,\n searchParams: this.searchParams,\n hash: this.hash\n };\n }\n clone() {\n return new NextURL(String(this), this[Internal].options);\n }\n}\n\n//# sourceMappingURL=next-url.js.map","export { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies';\n\n//# sourceMappingURL=cookies.js.map","import { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { RemovedUAError, RemovedPageError } from '../error';\nimport { RequestCookies } from './cookies';\nexport const INTERNALS = Symbol('internal request');\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */ export class NextRequest extends Request {\n constructor(input, init = {}){\n const url = typeof input !== 'string' && 'url' in input ? input.url : String(input);\n validateURL(url);\n // node Request instance requires duplex option when a body\n // is present or it errors, we don't handle this for\n // Request being passed in since it would have already\n // errored if this wasn't configured\n if (process.env.NEXT_RUNTIME !== 'edge') {\n if (init.body && init.duplex !== 'half') {\n init.duplex = 'half';\n }\n }\n if (input instanceof Request) super(input, init);\n else super(url, init);\n const nextUrl = new NextURL(url, {\n headers: toNodeOutgoingHttpHeaders(this.headers),\n nextConfig: init.nextConfig\n });\n this[INTERNALS] = {\n cookies: new RequestCookies(this.headers),\n nextUrl,\n url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString()\n };\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n nextUrl: this.nextUrl,\n url: this.url,\n // rest of props come from Request\n bodyUsed: this.bodyUsed,\n cache: this.cache,\n credentials: this.credentials,\n destination: this.destination,\n headers: Object.fromEntries(this.headers),\n integrity: this.integrity,\n keepalive: this.keepalive,\n method: this.method,\n mode: this.mode,\n redirect: this.redirect,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n signal: this.signal\n };\n }\n get cookies() {\n return this[INTERNALS].cookies;\n }\n get nextUrl() {\n return this[INTERNALS].nextUrl;\n }\n /**\n * @deprecated\n * `page` has been deprecated in favour of `URLPattern`.\n * Read more: https://nextjs.org/docs/messages/middleware-request-page\n */ get page() {\n throw new RemovedPageError();\n }\n /**\n * @deprecated\n * `ua` has been removed in favour of \\`userAgent\\` function.\n * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n */ get ua() {\n throw new RemovedUAError();\n }\n get url() {\n return this[INTERNALS].url;\n }\n}\n\n//# sourceMappingURL=request.js.map","export class ReflectAdapter {\n static get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n if (typeof value === 'function') {\n return value.bind(target);\n }\n return value;\n }\n static set(target, prop, value, receiver) {\n return Reflect.set(target, prop, value, receiver);\n }\n static has(target, prop) {\n return Reflect.has(target, prop);\n }\n static deleteProperty(target, prop) {\n return Reflect.deleteProperty(target, prop);\n }\n}\n\n//# sourceMappingURL=reflect.js.map","import { stringifyCookie } from '../../web/spec-extension/cookies';\nimport { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { ReflectAdapter } from './adapters/reflect';\nimport { ResponseCookies } from './cookies';\nconst INTERNALS = Symbol('internal response');\nconst REDIRECTS = new Set([\n 301,\n 302,\n 303,\n 307,\n 308\n]);\nfunction handleMiddlewareField(init, headers) {\n var _init_request;\n if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) {\n if (!(init.request.headers instanceof Headers)) {\n throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), \"__NEXT_ERROR_CODE\", {\n value: \"E119\",\n enumerable: false,\n configurable: true\n });\n }\n const keys = [];\n for (const [key, value] of init.request.headers){\n headers.set('x-middleware-request-' + key, value);\n keys.push(key);\n }\n headers.set('x-middleware-override-headers', keys.join(','));\n }\n}\n/**\n * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response)\n */ export class NextResponse extends Response {\n constructor(body, init = {}){\n super(body, init);\n const headers = this.headers;\n const cookies = new ResponseCookies(headers);\n const cookiesProxy = new Proxy(cookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'delete':\n case 'set':\n {\n return (...args)=>{\n const result = Reflect.apply(target[prop], target, args);\n const newHeaders = new Headers(headers);\n if (result instanceof ResponseCookies) {\n headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(','));\n }\n handleMiddlewareField(init, newHeaders);\n return result;\n };\n }\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n this[INTERNALS] = {\n cookies: cookiesProxy,\n url: init.url ? new NextURL(init.url, {\n headers: toNodeOutgoingHttpHeaders(headers),\n nextConfig: init.nextConfig\n }) : undefined\n };\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n url: this.url,\n // rest of props come from Response\n body: this.body,\n bodyUsed: this.bodyUsed,\n headers: Object.fromEntries(this.headers),\n ok: this.ok,\n redirected: this.redirected,\n status: this.status,\n statusText: this.statusText,\n type: this.type\n };\n }\n get cookies() {\n return this[INTERNALS].cookies;\n }\n static json(body, init) {\n const response = Response.json(body, init);\n return new NextResponse(response.body, response);\n }\n static redirect(url, init) {\n const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307;\n if (!REDIRECTS.has(status)) {\n throw Object.defineProperty(new RangeError('Failed to execute \"redirect\" on \"response\": Invalid status code'), \"__NEXT_ERROR_CODE\", {\n value: \"E529\",\n enumerable: false,\n configurable: true\n });\n }\n const initObj = typeof init === 'object' ? init : {};\n const headers = new Headers(initObj == null ? void 0 : initObj.headers);\n headers.set('Location', validateURL(url));\n return new NextResponse(null, {\n ...initObj,\n headers,\n status\n });\n }\n static rewrite(destination, init) {\n const headers = new Headers(init == null ? void 0 : init.headers);\n headers.set('x-middleware-rewrite', validateURL(destination));\n handleMiddlewareField(init, headers);\n return new NextResponse(null, {\n ...init,\n headers\n });\n }\n static next(init) {\n const headers = new Headers(init == null ? void 0 : init.headers);\n headers.set('x-middleware-next', '1');\n handleMiddlewareField(init, headers);\n return new NextResponse(null, {\n ...init,\n headers\n });\n }\n}\n\n//# sourceMappingURL=response.js.map","/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n","export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n","import { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers';\nconst INTERNAL_QUERY_NAMES = [\n NEXT_RSC_UNION_QUERY\n];\nexport function stripInternalQueries(query) {\n for (const name of INTERNAL_QUERY_NAMES){\n delete query[name];\n }\n}\nexport function stripInternalSearchParams(url) {\n const isStringUrl = typeof url === 'string';\n const instance = isStringUrl ? new URL(url) : url;\n instance.searchParams.delete(NEXT_RSC_UNION_QUERY);\n return isStringUrl ? instance.toString() : instance;\n}\n\n//# sourceMappingURL=internal-utils.js.map","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n","import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n","import { ReflectAdapter } from './reflect';\n/**\n * @internal\n */ export class ReadonlyHeadersError extends Error {\n constructor(){\n super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers');\n }\n static callable() {\n throw new ReadonlyHeadersError();\n }\n}\nexport class HeadersAdapter extends Headers {\n constructor(headers){\n // We've already overridden the methods that would be called, so we're just\n // calling the super constructor to ensure that the instanceof check works.\n super();\n this.headers = new Proxy(headers, {\n get (target, prop, receiver) {\n // Because this is just an object, we expect that all \"get\" operations\n // are for properties. If it's a \"get\" for a symbol, we'll just return\n // the symbol.\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(target, prop, receiver);\n }\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return;\n // If the original casing exists, return the value.\n return ReflectAdapter.get(target, original, receiver);\n },\n set (target, prop, value, receiver) {\n if (typeof prop === 'symbol') {\n return ReflectAdapter.set(target, prop, value, receiver);\n }\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, use the prop as the key.\n return ReflectAdapter.set(target, original ?? prop, value, receiver);\n },\n has (target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop);\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false;\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original);\n },\n deleteProperty (target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop);\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true;\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original);\n }\n });\n }\n /**\n * Seals a Headers instance to prevent modification by throwing an error when\n * any mutating method is called.\n */ static seal(headers) {\n return new Proxy(headers, {\n get (target, prop, receiver) {\n switch(prop){\n case 'append':\n case 'delete':\n case 'set':\n return ReadonlyHeadersError.callable;\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n }\n /**\n * Merges a header value into a string. This stores multiple values as an\n * array, so we need to merge them into a string.\n *\n * @param value a header value\n * @returns a merged header value (a string)\n */ merge(value) {\n if (Array.isArray(value)) return value.join(', ');\n return value;\n }\n /**\n * Creates a Headers instance from a plain object or a Headers instance.\n *\n * @param headers a plain object or a Headers instance\n * @returns a headers instance\n */ static from(headers) {\n if (headers instanceof Headers) return headers;\n return new HeadersAdapter(headers);\n }\n append(name, value) {\n const existing = this.headers[name];\n if (typeof existing === 'string') {\n this.headers[name] = [\n existing,\n value\n ];\n } else if (Array.isArray(existing)) {\n existing.push(value);\n } else {\n this.headers[name] = value;\n }\n }\n delete(name) {\n delete this.headers[name];\n }\n get(name) {\n const value = this.headers[name];\n if (typeof value !== 'undefined') return this.merge(value);\n return null;\n }\n has(name) {\n return typeof this.headers[name] !== 'undefined';\n }\n set(name, value) {\n this.headers[name] = value;\n }\n forEach(callbackfn, thisArg) {\n for (const [name, value] of this.entries()){\n callbackfn.call(thisArg, value, name, this);\n }\n }\n *entries() {\n for (const key of Object.keys(this.headers)){\n const name = key.toLowerCase();\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(name);\n yield [\n name,\n value\n ];\n }\n }\n *keys() {\n for (const key of Object.keys(this.headers)){\n const name = key.toLowerCase();\n yield name;\n }\n }\n *values() {\n for (const key of Object.keys(this.headers)){\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(key);\n yield value;\n }\n }\n [Symbol.iterator]() {\n return this.entries();\n }\n}\n\n//# sourceMappingURL=headers.js.map","const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), \"__NEXT_ERROR_CODE\", {\n value: \"E504\",\n enumerable: false,\n configurable: true\n});\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n static bind(fn) {\n return fn;\n }\n}\nconst maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;\nexport function createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nexport function bindSnapshot(fn) {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn);\n }\n return FakeAsyncLocalStorage.bind(fn);\n}\nexport function createSnapshot() {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot();\n }\n return function(fn, ...args) {\n return fn(...args);\n };\n}\n\n//# sourceMappingURL=async-local-storage.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const workAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=work-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { workAsyncStorageInstance } from './work-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { workAsyncStorageInstance as workAsyncStorage };\n\n//# sourceMappingURL=work-async-storage.external.js.map","import { RequestCookies } from '../cookies';\nimport { ResponseCookies } from '../cookies';\nimport { ReflectAdapter } from './reflect';\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external';\n/**\n * @internal\n */ export class ReadonlyRequestCookiesError extends Error {\n constructor(){\n super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options');\n }\n static callable() {\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport class RequestCookiesAdapter {\n static seal(cookies) {\n return new Proxy(cookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'clear':\n case 'delete':\n case 'set':\n return ReadonlyRequestCookiesError.callable;\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n }\n}\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies');\nexport function getModifiedCookieValues(cookies) {\n const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES];\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return [];\n }\n return modified;\n}\nexport function appendMutableCookies(headers, mutableCookies) {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies);\n if (modifiedCookieValues.length === 0) {\n return false;\n }\n // Return a new response that extends the response with\n // the modified cookies as fallbacks. `res` cookies\n // will still take precedence.\n const resCookies = new ResponseCookies(headers);\n const returnedCookies = resCookies.getAll();\n // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues){\n resCookies.set(cookie);\n }\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies){\n resCookies.set(cookie);\n }\n return true;\n}\nexport class MutableRequestCookiesAdapter {\n static wrap(cookies, onUpdateCookies) {\n const responseCookies = new ResponseCookies(new Headers());\n for (const cookie of cookies.getAll()){\n responseCookies.set(cookie);\n }\n let modifiedValues = [];\n const modifiedCookies = new Set();\n const updateResponseCookies = ()=>{\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore();\n if (workStore) {\n workStore.pathWasRevalidated = true;\n }\n const allCookies = responseCookies.getAll();\n modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name));\n if (onUpdateCookies) {\n const serializedCookies = [];\n for (const cookie of modifiedValues){\n const tempCookies = new ResponseCookies(new Headers());\n tempCookies.set(cookie);\n serializedCookies.push(tempCookies.toString());\n }\n onUpdateCookies(serializedCookies);\n }\n };\n const wrappedCookies = new Proxy(responseCookies, {\n get (target, prop, receiver) {\n switch(prop){\n // A special symbol to get the modified cookie values\n case SYMBOL_MODIFY_COOKIE_VALUES:\n return modifiedValues;\n // TODO: Throw error if trying to set a cookie after the response\n // headers have been set.\n case 'delete':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.delete(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n case 'set':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.set(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n }\n}\nexport function createCookiesWithMutableAccessCheck(requestStore) {\n const wrappedCookies = new Proxy(requestStore.mutableCookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'delete':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().delete');\n target.delete(...args);\n return wrappedCookies;\n };\n case 'set':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().set');\n target.set(...args);\n return wrappedCookies;\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n}\nexport function areCookiesMutableInCurrentPhase(requestStore) {\n return requestStore.phase === 'action';\n}\n/** Ensure that cookies() starts throwing on mutation\n * if we changed phases and can no longer mutate.\n *\n * This can happen when going:\n * 'render' -> 'after'\n * 'action' -> 'render'\n * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) {\n if (!areCookiesMutableInCurrentPhase(requestStore)) {\n // TODO: maybe we can give a more precise error message based on callingExpression?\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport function responseCookiesToRequestCookies(responseCookies) {\n const requestCookies = new RequestCookies(new Headers());\n for (const cookie of responseCookies.getAll()){\n requestCookies.set(cookie);\n }\n return requestCookies;\n}\n\n//# sourceMappingURL=request-cookies.js.map","/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/ // eslint typescript has a bug with TS enums\n/* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) {\n BaseServerSpan[\"handleRequest\"] = \"BaseServer.handleRequest\";\n BaseServerSpan[\"run\"] = \"BaseServer.run\";\n BaseServerSpan[\"pipe\"] = \"BaseServer.pipe\";\n BaseServerSpan[\"getStaticHTML\"] = \"BaseServer.getStaticHTML\";\n BaseServerSpan[\"render\"] = \"BaseServer.render\";\n BaseServerSpan[\"renderToResponseWithComponents\"] = \"BaseServer.renderToResponseWithComponents\";\n BaseServerSpan[\"renderToResponse\"] = \"BaseServer.renderToResponse\";\n BaseServerSpan[\"renderToHTML\"] = \"BaseServer.renderToHTML\";\n BaseServerSpan[\"renderError\"] = \"BaseServer.renderError\";\n BaseServerSpan[\"renderErrorToResponse\"] = \"BaseServer.renderErrorToResponse\";\n BaseServerSpan[\"renderErrorToHTML\"] = \"BaseServer.renderErrorToHTML\";\n BaseServerSpan[\"render404\"] = \"BaseServer.render404\";\n return BaseServerSpan;\n}(BaseServerSpan || {});\nvar LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) {\n LoadComponentsSpan[\"loadDefaultErrorComponents\"] = \"LoadComponents.loadDefaultErrorComponents\";\n LoadComponentsSpan[\"loadComponents\"] = \"LoadComponents.loadComponents\";\n return LoadComponentsSpan;\n}(LoadComponentsSpan || {});\nvar NextServerSpan = /*#__PURE__*/ function(NextServerSpan) {\n NextServerSpan[\"getRequestHandler\"] = \"NextServer.getRequestHandler\";\n NextServerSpan[\"getServer\"] = \"NextServer.getServer\";\n NextServerSpan[\"getServerRequestHandler\"] = \"NextServer.getServerRequestHandler\";\n NextServerSpan[\"createServer\"] = \"createServer.createServer\";\n return NextServerSpan;\n}(NextServerSpan || {});\nvar NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) {\n NextNodeServerSpan[\"compression\"] = \"NextNodeServer.compression\";\n NextNodeServerSpan[\"getBuildId\"] = \"NextNodeServer.getBuildId\";\n NextNodeServerSpan[\"createComponentTree\"] = \"NextNodeServer.createComponentTree\";\n NextNodeServerSpan[\"clientComponentLoading\"] = \"NextNodeServer.clientComponentLoading\";\n NextNodeServerSpan[\"getLayoutOrPageModule\"] = \"NextNodeServer.getLayoutOrPageModule\";\n NextNodeServerSpan[\"generateStaticRoutes\"] = \"NextNodeServer.generateStaticRoutes\";\n NextNodeServerSpan[\"generateFsStaticRoutes\"] = \"NextNodeServer.generateFsStaticRoutes\";\n NextNodeServerSpan[\"generatePublicRoutes\"] = \"NextNodeServer.generatePublicRoutes\";\n NextNodeServerSpan[\"generateImageRoutes\"] = \"NextNodeServer.generateImageRoutes.route\";\n NextNodeServerSpan[\"sendRenderResult\"] = \"NextNodeServer.sendRenderResult\";\n NextNodeServerSpan[\"proxyRequest\"] = \"NextNodeServer.proxyRequest\";\n NextNodeServerSpan[\"runApi\"] = \"NextNodeServer.runApi\";\n NextNodeServerSpan[\"render\"] = \"NextNodeServer.render\";\n NextNodeServerSpan[\"renderHTML\"] = \"NextNodeServer.renderHTML\";\n NextNodeServerSpan[\"imageOptimizer\"] = \"NextNodeServer.imageOptimizer\";\n NextNodeServerSpan[\"getPagePath\"] = \"NextNodeServer.getPagePath\";\n NextNodeServerSpan[\"getRoutesManifest\"] = \"NextNodeServer.getRoutesManifest\";\n NextNodeServerSpan[\"findPageComponents\"] = \"NextNodeServer.findPageComponents\";\n NextNodeServerSpan[\"getFontManifest\"] = \"NextNodeServer.getFontManifest\";\n NextNodeServerSpan[\"getServerComponentManifest\"] = \"NextNodeServer.getServerComponentManifest\";\n NextNodeServerSpan[\"getRequestHandler\"] = \"NextNodeServer.getRequestHandler\";\n NextNodeServerSpan[\"renderToHTML\"] = \"NextNodeServer.renderToHTML\";\n NextNodeServerSpan[\"renderError\"] = \"NextNodeServer.renderError\";\n NextNodeServerSpan[\"renderErrorToHTML\"] = \"NextNodeServer.renderErrorToHTML\";\n NextNodeServerSpan[\"render404\"] = \"NextNodeServer.render404\";\n NextNodeServerSpan[\"startResponse\"] = \"NextNodeServer.startResponse\";\n // nested inner span, does not require parent scope name\n NextNodeServerSpan[\"route\"] = \"route\";\n NextNodeServerSpan[\"onProxyReq\"] = \"onProxyReq\";\n NextNodeServerSpan[\"apiResolver\"] = \"apiResolver\";\n NextNodeServerSpan[\"internalFetch\"] = \"internalFetch\";\n return NextNodeServerSpan;\n}(NextNodeServerSpan || {});\nvar StartServerSpan = /*#__PURE__*/ function(StartServerSpan) {\n StartServerSpan[\"startServer\"] = \"startServer.startServer\";\n return StartServerSpan;\n}(StartServerSpan || {});\nvar RenderSpan = /*#__PURE__*/ function(RenderSpan) {\n RenderSpan[\"getServerSideProps\"] = \"Render.getServerSideProps\";\n RenderSpan[\"getStaticProps\"] = \"Render.getStaticProps\";\n RenderSpan[\"renderToString\"] = \"Render.renderToString\";\n RenderSpan[\"renderDocument\"] = \"Render.renderDocument\";\n RenderSpan[\"createBodyResult\"] = \"Render.createBodyResult\";\n return RenderSpan;\n}(RenderSpan || {});\nvar AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) {\n AppRenderSpan[\"renderToString\"] = \"AppRender.renderToString\";\n AppRenderSpan[\"renderToReadableStream\"] = \"AppRender.renderToReadableStream\";\n AppRenderSpan[\"getBodyResult\"] = \"AppRender.getBodyResult\";\n AppRenderSpan[\"fetch\"] = \"AppRender.fetch\";\n return AppRenderSpan;\n}(AppRenderSpan || {});\nvar RouterSpan = /*#__PURE__*/ function(RouterSpan) {\n RouterSpan[\"executeRoute\"] = \"Router.executeRoute\";\n return RouterSpan;\n}(RouterSpan || {});\nvar NodeSpan = /*#__PURE__*/ function(NodeSpan) {\n NodeSpan[\"runHandler\"] = \"Node.runHandler\";\n return NodeSpan;\n}(NodeSpan || {});\nvar AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) {\n AppRouteRouteHandlersSpan[\"runHandler\"] = \"AppRouteRouteHandlers.runHandler\";\n return AppRouteRouteHandlersSpan;\n}(AppRouteRouteHandlersSpan || {});\nvar ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) {\n ResolveMetadataSpan[\"generateMetadata\"] = \"ResolveMetadata.generateMetadata\";\n ResolveMetadataSpan[\"generateViewport\"] = \"ResolveMetadata.generateViewport\";\n return ResolveMetadataSpan;\n}(ResolveMetadataSpan || {});\nvar MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) {\n MiddlewareSpan[\"execute\"] = \"Middleware.execute\";\n return MiddlewareSpan;\n}(MiddlewareSpan || {});\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n \"Middleware.execute\",\n \"BaseServer.handleRequest\",\n \"Render.getServerSideProps\",\n \"Render.getStaticProps\",\n \"AppRender.fetch\",\n \"AppRender.getBodyResult\",\n \"Render.renderDocument\",\n \"Node.runHandler\",\n \"AppRouteRouteHandlers.runHandler\",\n \"ResolveMetadata.generateMetadata\",\n \"ResolveMetadata.generateViewport\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.getLayoutOrPageModule\",\n \"NextNodeServer.startResponse\",\n \"NextNodeServer.clientComponentLoading\"\n]);\n// These Spans are allowed to be always logged\n// when the otel log prefix env is set\nexport const LogSpanAllowList = new Set([\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.clientComponentLoading\"\n]);\nexport { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, };\n\n//# sourceMappingURL=constants.js.map","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants';\nimport { isThenable } from '../../../shared/lib/is-thenable';\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX;\nlet api;\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api');\n} else {\n try {\n api = require('@opentelemetry/api');\n } catch (err) {\n api = require('next/dist/compiled/@opentelemetry/api');\n }\n}\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api;\nexport class BubbledError extends Error {\n constructor(bubble, result){\n super(), this.bubble = bubble, this.result = result;\n }\n}\nexport function isBubbledError(error) {\n if (typeof error !== 'object' || error === null) return false;\n return error instanceof BubbledError;\n}\nconst closeSpanWithError = (span, error)=>{\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true);\n } else {\n if (error) {\n span.recordException(error);\n span.setAttribute('error.type', error.name);\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error == null ? void 0 : error.message\n });\n }\n span.end();\n};\n/** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map();\nconst rootSpanIdKey = api.createContextKey('next.rootSpanId');\nlet lastSpanId = 0;\nconst getSpanId = ()=>lastSpanId++;\nconst clientTraceDataSetter = {\n set (carrier, key, value) {\n carrier.push({\n key,\n value\n });\n }\n};\nclass NextTracerImpl {\n /**\n * Returns an instance to the trace with configured name.\n * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization,\n * This should be lazily evaluated.\n */ getTracerInstance() {\n return trace.getTracer('next.js', '0.0.1');\n }\n getContext() {\n return context;\n }\n getTracePropagationData() {\n const activeContext = context.active();\n const entries = [];\n propagation.inject(activeContext, entries, clientTraceDataSetter);\n return entries;\n }\n getActiveScopeSpan() {\n return trace.getSpan(context == null ? void 0 : context.active());\n }\n withPropagatedContext(carrier, fn, getter) {\n const activeContext = context.active();\n if (trace.getSpanContext(activeContext)) {\n // Active span is already set, too late to propagate.\n return fn();\n }\n const remoteContext = propagation.extract(activeContext, carrier, getter);\n return context.with(remoteContext, fn);\n }\n trace(...args) {\n var _trace_getSpanContext;\n const [type, fnOrOptions, fnOrEmpty] = args;\n // coerce options form overload\n const { fn, options } = typeof fnOrOptions === 'function' ? {\n fn: fnOrOptions,\n options: {}\n } : {\n fn: fnOrEmpty,\n options: {\n ...fnOrOptions\n }\n };\n const spanName = options.spanName ?? type;\n if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) {\n return fn();\n }\n // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it.\n let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n let isRootSpan = false;\n if (!spanContext) {\n spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT;\n isRootSpan = true;\n } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) {\n isRootSpan = true;\n }\n const spanId = getSpanId();\n options.attributes = {\n 'next.span_name': spanName,\n 'next.span_type': type,\n ...options.attributes\n };\n return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{\n let startTime;\n if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) {\n startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined;\n }\n let cleanedUp = false;\n const onCleanup = ()=>{\n if (cleanedUp) return;\n cleanedUp = true;\n rootSpanAttributesStore.delete(spanId);\n if (startTime) {\n performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, {\n start: startTime,\n end: performance.now()\n });\n }\n };\n if (isRootSpan) {\n rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {})));\n }\n if (fn.length > 1) {\n try {\n return fn(span, (err)=>closeSpanWithError(span, err));\n } catch (err) {\n closeSpanWithError(span, err);\n throw err;\n } finally{\n onCleanup();\n }\n }\n try {\n const result = fn(span);\n if (isThenable(result)) {\n // If there's error make sure it throws\n return result.then((res)=>{\n span.end();\n // Need to pass down the promise result,\n // it could be react stream response with error { error, stream }\n return res;\n }).catch((err)=>{\n closeSpanWithError(span, err);\n throw err;\n }).finally(onCleanup);\n } else {\n span.end();\n onCleanup();\n }\n return result;\n } catch (err) {\n closeSpanWithError(span, err);\n onCleanup();\n throw err;\n }\n }));\n }\n wrap(...args) {\n const tracer = this;\n const [name, options, fn] = args.length === 3 ? args : [\n args[0],\n {},\n args[1]\n ];\n if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') {\n return fn;\n }\n return function() {\n let optionsObj = options;\n if (typeof optionsObj === 'function' && typeof fn === 'function') {\n optionsObj = optionsObj.apply(this, arguments);\n }\n const lastArgId = arguments.length - 1;\n const cb = arguments[lastArgId];\n if (typeof cb === 'function') {\n const scopeBoundCb = tracer.getContext().bind(context.active(), cb);\n return tracer.trace(name, optionsObj, (_span, done)=>{\n arguments[lastArgId] = function(err) {\n done == null ? void 0 : done(err);\n return scopeBoundCb.apply(this, arguments);\n };\n return fn.apply(this, arguments);\n });\n } else {\n return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments));\n }\n };\n }\n startSpan(...args) {\n const [type, options] = args;\n const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n return this.getTracerInstance().startSpan(type, options, spanContext);\n }\n getSpanContext(parentSpan) {\n const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined;\n return spanContext;\n }\n getRootSpanAttributes() {\n const spanId = context.active().getValue(rootSpanIdKey);\n return rootSpanAttributesStore.get(spanId);\n }\n setRootSpanAttribute(key, value) {\n const spanId = context.active().getValue(rootSpanIdKey);\n const attributes = rootSpanAttributesStore.get(spanId);\n if (attributes) {\n attributes.set(key, value);\n }\n }\n}\nconst getTracer = (()=>{\n const tracer = new NextTracerImpl();\n return ()=>tracer;\n})();\nexport { getTracer, SpanStatusCode, SpanKind };\n\n//# sourceMappingURL=tracer.js.map","import { HeadersAdapter } from '../web/spec-extension/adapters/headers';\nimport { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants';\nimport { getTracer } from '../lib/trace/tracer';\nimport { NodeSpan } from '../lib/trace/constants';\nexport function wrapApiHandler(page, handler) {\n return (...args)=>{\n getTracer().setRootSpanAttribute('next.route', page);\n // Call API route method\n return getTracer().trace(NodeSpan.runHandler, {\n spanName: `executing api route (pages) ${page}`\n }, ()=>handler(...args));\n };\n}\n/**\n *\n * @param res response object\n * @param statusCode `HTTP` status code of response\n */ export function sendStatusCode(res, statusCode) {\n res.statusCode = statusCode;\n return res;\n}\n/**\n *\n * @param res response object\n * @param [statusOrUrl] `HTTP` status code of redirect\n * @param url URL of redirect\n */ export function redirect(res, statusOrUrl, url) {\n if (typeof statusOrUrl === 'string') {\n url = statusOrUrl;\n statusOrUrl = 307;\n }\n if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {\n throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), \"__NEXT_ERROR_CODE\", {\n value: \"E389\",\n enumerable: false,\n configurable: true\n });\n }\n res.writeHead(statusOrUrl, {\n Location: url\n });\n res.write(url);\n res.end();\n return res;\n}\nexport function checkIsOnDemandRevalidate(req, previewProps) {\n const headers = HeadersAdapter.from(req.headers);\n const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER);\n const isOnDemandRevalidate = previewModeId === previewProps.previewModeId;\n const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER);\n return {\n isOnDemandRevalidate,\n revalidateOnlyGenerated\n };\n}\nexport const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`;\nexport const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`;\nexport const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024;\nexport const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA);\nexport const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS);\nexport function clearPreviewData(res, options = {}) {\n if (SYMBOL_CLEARED_COOKIES in res) {\n return res;\n }\n const { serialize } = require('next/dist/compiled/cookie');\n const previous = res.getHeader('Set-Cookie');\n res.setHeader(`Set-Cookie`, [\n ...typeof previous === 'string' ? [\n previous\n ] : Array.isArray(previous) ? previous : [],\n serialize(COOKIE_NAME_PRERENDER_BYPASS, '', {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n expires: new Date(0),\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n ...options.path !== undefined ? {\n path: options.path\n } : undefined\n }),\n serialize(COOKIE_NAME_PRERENDER_DATA, '', {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n expires: new Date(0),\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n ...options.path !== undefined ? {\n path: options.path\n } : undefined\n })\n ]);\n Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, {\n value: true,\n enumerable: false\n });\n return res;\n}\n/**\n * Custom error class\n */ export class ApiError extends Error {\n constructor(statusCode, message){\n super(message);\n this.statusCode = statusCode;\n }\n}\n/**\n * Sends error in `response`\n * @param res response object\n * @param statusCode of response\n * @param message of response\n */ export function sendError(res, statusCode, message) {\n res.statusCode = statusCode;\n res.statusMessage = message;\n res.end(message);\n}\n/**\n * Execute getter function only if its needed\n * @param LazyProps `req` and `params` for lazyProp\n * @param prop name of property\n * @param getter function to get data\n */ export function setLazyProp({ req }, prop, getter) {\n const opts = {\n configurable: true,\n enumerable: true\n };\n const optsReset = {\n ...opts,\n writable: true\n };\n Object.defineProperty(req, prop, {\n ...opts,\n get: ()=>{\n const value = getter();\n // we set the property on the object to avoid recalculating it\n Object.defineProperty(req, prop, {\n ...optsReset,\n value\n });\n return value;\n },\n set: (value)=>{\n Object.defineProperty(req, prop, {\n ...optsReset,\n value\n });\n }\n });\n}\n\n//# sourceMappingURL=index.js.map","import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils';\nexport class DraftModeProvider {\n constructor(previewProps, req, cookies, mutableCookies){\n var _cookies_get;\n // The logic for draftMode() is very similar to tryGetPreviewData()\n // but Draft Mode does not have any data associated with it.\n const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate;\n const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value;\n this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`.\n process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id'));\n this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId;\n this._mutableCookies = mutableCookies;\n }\n get isEnabled() {\n return this._isEnabled;\n }\n enable() {\n if (!this._previewModeId) {\n throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), \"__NEXT_ERROR_CODE\", {\n value: \"E93\",\n enumerable: false,\n configurable: true\n });\n }\n this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: this._previewModeId,\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/'\n });\n this._isEnabled = true;\n }\n disable() {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: '',\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n expires: new Date(0)\n });\n this._isEnabled = false;\n }\n}\n\n//# sourceMappingURL=draft-mode-provider.js.map","import { FLIGHT_HEADERS } from '../../client/components/app-router-headers';\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers';\nimport { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies';\nimport { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies';\nimport { DraftModeProvider } from './draft-mode-provider';\nimport { splitCookiesString } from '../web/utils';\nfunction getHeaders(headers) {\n const cleaned = HeadersAdapter.from(headers);\n for (const header of FLIGHT_HEADERS){\n cleaned.delete(header);\n }\n return HeadersAdapter.seal(cleaned);\n}\nfunction getMutableCookies(headers, onUpdateCookies) {\n const cookies = new RequestCookies(HeadersAdapter.from(headers));\n return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies);\n}\n/**\n * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`),\n * then merge those into the existing cookie object, so that when `cookies()` is accessed\n * it's able to read the newly set cookies.\n */ function mergeMiddlewareCookies(req, existingCookies) {\n if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') {\n const setCookieValue = req.headers['x-middleware-set-cookie'];\n const responseHeaders = new Headers();\n for (const cookie of splitCookiesString(setCookieValue)){\n responseHeaders.append('set-cookie', cookie);\n }\n const responseCookies = new ResponseCookies(responseHeaders);\n // Transfer cookies from ResponseCookies to RequestCookies\n for (const cookie of responseCookies.getAll()){\n existingCookies.set(cookie);\n }\n }\n}\nexport function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) {\n return createRequestStoreImpl(// Pages start in render phase by default\n 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams);\n}\nexport function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) {\n return createRequestStoreImpl(// API routes start in action phase by default\n 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null);\n}\nfunction createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) {\n function defaultOnUpdateCookies(cookies) {\n if (res) {\n res.setHeader('Set-Cookie', cookies);\n }\n }\n const cache = {};\n return {\n type: 'request',\n phase,\n implicitTags,\n // Rather than just using the whole `url` here, we pull the parts we want\n // to ensure we don't use parts of the URL that we shouldn't. This also\n // lets us avoid requiring an empty string for `search` in the type.\n url: {\n pathname: url.pathname,\n search: url.search ?? ''\n },\n rootParams,\n get headers () {\n if (!cache.headers) {\n // Seal the headers object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.headers = getHeaders(req.headers);\n }\n return cache.headers;\n },\n get cookies () {\n if (!cache.cookies) {\n // if middleware is setting cookie(s), then include those in\n // the initial cached cookies so they can be read in render\n const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers));\n mergeMiddlewareCookies(req, requestCookies);\n // Seal the cookies object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.cookies = RequestCookiesAdapter.seal(requestCookies);\n }\n return cache.cookies;\n },\n set cookies (value){\n cache.cookies = value;\n },\n get mutableCookies () {\n if (!cache.mutableCookies) {\n const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined));\n mergeMiddlewareCookies(req, mutableCookies);\n cache.mutableCookies = mutableCookies;\n }\n return cache.mutableCookies;\n },\n get userspaceMutableCookies () {\n if (!cache.userspaceMutableCookies) {\n const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this);\n cache.userspaceMutableCookies = userspaceMutableCookies;\n }\n return cache.userspaceMutableCookies;\n },\n get draftMode () {\n if (!cache.draftMode) {\n cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies);\n }\n return cache.draftMode;\n },\n renderResumeDataCache: renderResumeDataCache ?? null,\n isHmrRefresh,\n serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache,\n devFallbackParams\n };\n}\nexport function synchronizeMutableCookies(store) {\n // TODO: does this need to update headers as well?\n store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies));\n}\n\n//# sourceMappingURL=request-store.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const workUnitAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=work-unit-async-storage-instance.js.map","export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n","// Share the instance module in the next-shared layer\nimport { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nimport { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nexport { workUnitAsyncStorageInstance as workUnitAsyncStorage };\nexport function throwForMissingRequestStore(callingExpression) {\n throw Object.defineProperty(new Error(`\\`${callingExpression}\\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), \"__NEXT_ERROR_CODE\", {\n value: \"E251\",\n enumerable: false,\n configurable: true\n });\n}\nexport function throwInvariantForMissingStore() {\n throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), \"__NEXT_ERROR_CODE\", {\n value: \"E696\",\n enumerable: false,\n configurable: true\n });\n}\nexport function getPrerenderResumeDataCache(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-ppr':\n return workUnitStore.prerenderResumeDataCache;\n case 'prerender-client':\n // TODO eliminate fetch caching in client scope and stop exposing this data\n // cache during SSR.\n return workUnitStore.prerenderResumeDataCache;\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getRenderResumeDataCache(workUnitStore) {\n switch(workUnitStore.type){\n case 'request':\n return workUnitStore.renderResumeDataCache;\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-client':\n if (workUnitStore.renderResumeDataCache) {\n // If we are in a prerender, we might have a render resume data cache\n // that is used to read from prefilled caches.\n return workUnitStore.renderResumeDataCache;\n }\n // fallthrough\n case 'prerender-ppr':\n // Otherwise we return the mutable resume data cache here as an immutable\n // version of the cache as it can also be used for reading.\n return workUnitStore.prerenderResumeDataCache;\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-legacy':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getHmrRefreshHash(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'prerender':\n case 'prerender-runtime':\n return workUnitStore.hmrRefreshHash;\n case 'request':\n var _workUnitStore_cookies_get;\n return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value;\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\nexport function isHmrRefresh(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.isHmrRefresh ?? false;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return false;\n}\nexport function getServerComponentsHmrCache(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.serverComponentsHmrCache;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\n/**\n * Returns a draft mode provider only if draft mode is enabled.\n */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) {\n if (workStore.isDraftMode) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-runtime':\n case 'request':\n return workUnitStore.draftMode;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\nexport function getCacheSignal(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n return workUnitStore.cacheSignal;\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getRuntimeStagePromise(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender-runtime':\n case 'private-cache':\n return workUnitStore.runtimeStagePromise;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\n\n//# sourceMappingURL=work-unit-async-storage.external.js.map","/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */ class LRUNode {\n constructor(key, data, size){\n this.prev = null;\n this.next = null;\n this.key = key;\n this.data = data;\n this.size = size;\n }\n}\n/**\n * Sentinel node used for head/tail boundaries.\n * These nodes don't contain actual cache data but simplify list operations.\n */ class SentinelNode {\n constructor(){\n this.prev = null;\n this.next = null;\n }\n}\n/**\n * LRU (Least Recently Used) Cache implementation using a doubly-linked list\n * and hash map for O(1) operations.\n *\n * Algorithm:\n * - Uses a doubly-linked list to maintain access order (most recent at head)\n * - Hash map provides O(1) key-to-node lookup\n * - Sentinel head/tail nodes simplify edge case handling\n * - Size-based eviction supports custom size calculation functions\n *\n * Data Structure Layout:\n * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL\n *\n * Operations:\n * - get(): Move accessed node to head (mark as most recent)\n * - set(): Add new node at head, evict from tail if over capacity\n * - Eviction: Remove least recent node (tail.prev) when size exceeds limit\n */ export class LRUCache {\n constructor(maxSize, calculateSize, onEvict){\n this.cache = new Map();\n this.totalSize = 0;\n this.maxSize = maxSize;\n this.calculateSize = calculateSize;\n this.onEvict = onEvict;\n // Create sentinel nodes to simplify doubly-linked list operations\n // HEAD <-> TAIL (empty list)\n this.head = new SentinelNode();\n this.tail = new SentinelNode();\n this.head.next = this.tail;\n this.tail.prev = this.head;\n }\n /**\n * Adds a node immediately after the head (marks as most recently used).\n * Used when inserting new items or when an item is accessed.\n * PRECONDITION: node must be disconnected (prev/next should be null)\n */ addToHead(node) {\n node.prev = this.head;\n node.next = this.head.next;\n // head.next is always non-null (points to tail or another node)\n this.head.next.prev = node;\n this.head.next = node;\n }\n /**\n * Removes a node from its current position in the doubly-linked list.\n * Updates the prev/next pointers of adjacent nodes to maintain list integrity.\n * PRECONDITION: node must be connected (prev/next are non-null)\n */ removeNode(node) {\n // Connected nodes always have non-null prev/next\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }\n /**\n * Moves an existing node to the head position (marks as most recently used).\n * This is the core LRU operation - accessed items become most recent.\n */ moveToHead(node) {\n this.removeNode(node);\n this.addToHead(node);\n }\n /**\n * Removes and returns the least recently used node (the one before tail).\n * This is called during eviction when the cache exceeds capacity.\n * PRECONDITION: cache is not empty (ensured by caller)\n */ removeTail() {\n const lastNode = this.tail.prev;\n // tail.prev is always non-null and always LRUNode when cache is not empty\n this.removeNode(lastNode);\n return lastNode;\n }\n /**\n * Sets a key-value pair in the cache.\n * If the key exists, updates the value and moves to head.\n * If new, adds at head and evicts from tail if necessary.\n *\n * Time Complexity:\n * - O(1) for uniform item sizes\n * - O(k) where k is the number of items evicted (can be O(N) for variable sizes)\n */ set(key, value) {\n const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1;\n if (size <= 0) {\n throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), \"__NEXT_ERROR_CODE\", {\n value: \"E789\",\n enumerable: false,\n configurable: true\n });\n }\n if (size > this.maxSize) {\n console.warn('Single item size exceeds maxSize');\n return false;\n }\n const existing = this.cache.get(key);\n if (existing) {\n // Update existing node: adjust size and move to head (most recent)\n existing.data = value;\n this.totalSize = this.totalSize - existing.size + size;\n existing.size = size;\n this.moveToHead(existing);\n } else {\n // Add new node at head (most recent position)\n const newNode = new LRUNode(key, value, size);\n this.cache.set(key, newNode);\n this.addToHead(newNode);\n this.totalSize += size;\n }\n // Evict least recently used items until under capacity\n while(this.totalSize > this.maxSize && this.cache.size > 0){\n const tail = this.removeTail();\n this.cache.delete(tail.key);\n this.totalSize -= tail.size;\n this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data);\n }\n return true;\n }\n /**\n * Checks if a key exists in the cache.\n * This is a pure query operation - does NOT update LRU order.\n *\n * Time Complexity: O(1)\n */ has(key) {\n return this.cache.has(key);\n }\n /**\n * Retrieves a value by key and marks it as most recently used.\n * Moving to head maintains the LRU property for future evictions.\n *\n * Time Complexity: O(1)\n */ get(key) {\n const node = this.cache.get(key);\n if (!node) return undefined;\n // Mark as most recently used by moving to head\n this.moveToHead(node);\n return node.data;\n }\n /**\n * Returns an iterator over the cache entries. The order is outputted in the\n * order of most recently used to least recently used.\n */ *[Symbol.iterator]() {\n let current = this.head.next;\n while(current && current !== this.tail){\n // Between head and tail, current is always LRUNode\n const node = current;\n yield [\n node.key,\n node.data\n ];\n current = current.next;\n }\n }\n /**\n * Removes a specific key from the cache.\n * Updates both the hash map and doubly-linked list.\n *\n * Note: This is an explicit removal and does NOT trigger the `onEvict`\n * callback. Use this for intentional deletions where eviction tracking\n * is not needed.\n *\n * Time Complexity: O(1)\n */ remove(key) {\n const node = this.cache.get(key);\n if (!node) return;\n this.removeNode(node);\n this.cache.delete(key);\n this.totalSize -= node.size;\n }\n /**\n * Returns the number of items in the cache.\n */ get size() {\n return this.cache.size;\n }\n /**\n * Returns the current total size of all cached items.\n * This uses the custom size calculation if provided.\n */ get currentSize() {\n return this.totalSize;\n }\n}\n\n//# sourceMappingURL=lru-cache.js.map","import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n","/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n","import DefaultCacheHandler from '../lib/cache-handlers/default.external';\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{\n console.log(`use-cache: ${message}`, ...args);\n} : undefined;\nconst handlersSymbol = Symbol.for('@next/cache-handlers');\nconst handlersMapSymbol = Symbol.for('@next/cache-handlers-map');\nconst handlersSetSymbol = Symbol.for('@next/cache-handlers-set');\n/**\n * The reference to the cache handlers. We store the cache handlers on the\n * global object so that we can access the same instance across different\n * boundaries (such as different copies of the same module).\n */ const reference = globalThis;\n/**\n * Initialize the cache handlers.\n * @returns `true` if the cache handlers were initialized, `false` if they were already initialized.\n */ export function initializeCacheHandlers() {\n // If the cache handlers have already been initialized, don't do it again.\n if (reference[handlersMapSymbol]) {\n debug == null ? void 0 : debug('cache handlers already initialized');\n return false;\n }\n debug == null ? void 0 : debug('initializing cache handlers');\n reference[handlersMapSymbol] = new Map();\n // Initialize the cache from the symbol contents first.\n if (reference[handlersSymbol]) {\n let fallback;\n if (reference[handlersSymbol].DefaultCache) {\n debug == null ? void 0 : debug('setting \"default\" cache handler from symbol');\n fallback = reference[handlersSymbol].DefaultCache;\n } else {\n debug == null ? void 0 : debug('setting \"default\" cache handler from default');\n fallback = DefaultCacheHandler;\n }\n reference[handlersMapSymbol].set('default', fallback);\n if (reference[handlersSymbol].RemoteCache) {\n debug == null ? void 0 : debug('setting \"remote\" cache handler from symbol');\n reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache);\n } else {\n debug == null ? void 0 : debug('setting \"remote\" cache handler from default');\n reference[handlersMapSymbol].set('remote', fallback);\n }\n } else {\n debug == null ? void 0 : debug('setting \"default\" cache handler from default');\n reference[handlersMapSymbol].set('default', DefaultCacheHandler);\n debug == null ? void 0 : debug('setting \"remote\" cache handler from default');\n reference[handlersMapSymbol].set('remote', DefaultCacheHandler);\n }\n // Create a set of the cache handlers.\n reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values());\n return true;\n}\n/**\n * Get a cache handler by kind.\n * @param kind - The kind of cache handler to get.\n * @returns The cache handler, or `undefined` if it does not exist.\n * @throws If the cache handlers are not initialized.\n */ export function getCacheHandler(kind) {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol]) {\n throw Object.defineProperty(new Error('Cache handlers not initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E649\",\n enumerable: false,\n configurable: true\n });\n }\n return reference[handlersMapSymbol].get(kind);\n}\n/**\n * Get a set iterator over the cache handlers.\n * @returns An iterator over the cache handlers, or `undefined` if they are not\n * initialized.\n */ export function getCacheHandlers() {\n if (!reference[handlersSetSymbol]) {\n return undefined;\n }\n return reference[handlersSetSymbol].values();\n}\n/**\n * Get a map iterator over the cache handlers (keyed by kind).\n * @returns An iterator over the cache handler entries, or `undefined` if they\n * are not initialized.\n * @throws If the cache handlers are not initialized.\n */ export function getCacheHandlerEntries() {\n if (!reference[handlersMapSymbol]) {\n return undefined;\n }\n return reference[handlersMapSymbol].entries();\n}\n/**\n * Set a cache handler by kind.\n * @param kind - The kind of cache handler to set.\n * @param cacheHandler - The cache handler to set.\n */ export function setCacheHandler(kind, cacheHandler) {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) {\n throw Object.defineProperty(new Error('Cache handlers not initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E649\",\n enumerable: false,\n configurable: true\n });\n }\n debug == null ? void 0 : debug('setting cache handler for \"%s\"', kind);\n reference[handlersMapSymbol].set(kind, cacheHandler);\n reference[handlersSetSymbol].add(cacheHandler);\n}\n\n//# sourceMappingURL=handlers.js.map","import { getCacheHandlers } from './use-cache/handlers';\n/** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) {\n if (!store) {\n return callback();\n }\n // If we executed any revalidates during the request, then we don't want to execute them again.\n // save the state so we can check if anything changed after we're done running callbacks.\n const savedRevalidationState = cloneRevalidationState(store);\n try {\n return await callback();\n } finally{\n // Check if we have any new revalidates, and if so, wait until they are all resolved.\n const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store));\n await executeRevalidates(store, newRevalidates);\n }\n}\nfunction cloneRevalidationState(store) {\n return {\n pendingRevalidatedTags: store.pendingRevalidatedTags ? [\n ...store.pendingRevalidatedTags\n ] : [],\n pendingRevalidates: {\n ...store.pendingRevalidates\n },\n pendingRevalidateWrites: store.pendingRevalidateWrites ? [\n ...store.pendingRevalidateWrites\n ] : []\n };\n}\nfunction diffRevalidationState(prev, curr) {\n const prevTags = new Set(prev.pendingRevalidatedTags);\n const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites);\n return {\n pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)),\n pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))),\n pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise))\n };\n}\nasync function revalidateTags(tags, incrementalCache) {\n if (tags.length === 0) {\n return;\n }\n const promises = [];\n if (incrementalCache) {\n promises.push(incrementalCache.revalidateTag(tags));\n }\n const handlers = getCacheHandlers();\n if (handlers) {\n for (const handler of handlers){\n promises.push(handler.expireTags(...tags));\n }\n }\n await Promise.all(promises);\n}\nexport async function executeRevalidates(workStore, state) {\n const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? [];\n const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {};\n const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? [];\n return Promise.all([\n revalidateTags(pendingRevalidatedTags, workStore.incrementalCache),\n ...Object.values(pendingRevalidates),\n ...pendingRevalidateWrites\n ]);\n}\n\n//# sourceMappingURL=revalidation-utils.js.map","const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), \"__NEXT_ERROR_CODE\", {\n value: \"E504\",\n enumerable: false,\n configurable: true\n});\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n static bind(fn) {\n return fn;\n }\n}\nconst maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;\nexport function createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nexport function bindSnapshot(fn) {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn);\n }\n return FakeAsyncLocalStorage.bind(fn);\n}\nexport function createSnapshot() {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot();\n }\n return function(fn, ...args) {\n return fn(...args);\n };\n}\n\n//# sourceMappingURL=async-local-storage.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const afterTaskAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=after-task-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { afterTaskAsyncStorage };\n\n//# sourceMappingURL=after-task-async-storage.external.js.map","import PromiseQueue from 'next/dist/compiled/p-queue';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nimport { isThenable } from '../../shared/lib/is-thenable';\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { withExecuteRevalidates } from '../revalidation-utils';\nimport { bindSnapshot } from '../app-render/async-local-storage';\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external';\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external';\nexport class AfterContext {\n constructor({ waitUntil, onClose, onTaskError }){\n this.workUnitStores = new Set();\n this.waitUntil = waitUntil;\n this.onClose = onClose;\n this.onTaskError = onTaskError;\n this.callbackQueue = new PromiseQueue();\n this.callbackQueue.pause();\n }\n after(task) {\n if (isThenable(task)) {\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable();\n }\n this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error)));\n } else if (typeof task === 'function') {\n // TODO(after): implement tracing\n this.addCallback(task);\n } else {\n throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), \"__NEXT_ERROR_CODE\", {\n value: \"E50\",\n enumerable: false,\n configurable: true\n });\n }\n }\n addCallback(callback) {\n // if something is wrong, throw synchronously, bubbling up to the `after` callsite.\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable();\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n this.workUnitStores.add(workUnitStore);\n }\n const afterTaskStore = afterTaskAsyncStorage.getStore();\n // This is used for checking if request APIs can be called inside `after`.\n // Note that we need to check the phase in which the *topmost* `after` was called (which should be \"action\"),\n // not the current phase (which might be \"after\" if we're in a nested after).\n // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`.\n const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after\n : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after\n ;\n // this should only happen once.\n if (!this.runCallbacksOnClosePromise) {\n this.runCallbacksOnClosePromise = this.runCallbacksOnClose();\n this.waitUntil(this.runCallbacksOnClosePromise);\n }\n // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es).\n // We do this because we want all of these to be equivalent in every regard except timing:\n // after(() => x())\n // after(x())\n // await x()\n const wrappedCallback = bindSnapshot(async ()=>{\n try {\n await afterTaskAsyncStorage.run({\n rootTaskSpawnPhase\n }, ()=>callback());\n } catch (error) {\n this.reportTaskError('function', error);\n }\n });\n this.callbackQueue.add(wrappedCallback);\n }\n async runCallbacksOnClose() {\n await new Promise((resolve)=>this.onClose(resolve));\n return this.runCallbacks();\n }\n async runCallbacks() {\n if (this.callbackQueue.size === 0) return;\n for (const workUnitStore of this.workUnitStores){\n workUnitStore.phase = 'after';\n }\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), \"__NEXT_ERROR_CODE\", {\n value: \"E547\",\n enumerable: false,\n configurable: true\n });\n }\n return withExecuteRevalidates(workStore, ()=>{\n this.callbackQueue.start();\n return this.callbackQueue.onIdle();\n });\n }\n reportTaskError(taskKind, error) {\n // TODO(after): this is fine for now, but will need better intergration with our error reporting.\n // TODO(after): should we log this if we have a onTaskError callback?\n console.error(taskKind === 'promise' ? `A promise passed to \\`after()\\` rejected:` : `An error occurred in a function passed to \\`after()\\`:`, error);\n if (this.onTaskError) {\n // this is very defensive, but we really don't want anything to blow up in an error handler\n try {\n this.onTaskError == null ? void 0 : this.onTaskError.call(this, error);\n } catch (handlerError) {\n console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', {\n cause: handlerError\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E569\",\n enumerable: false,\n configurable: true\n }));\n }\n }\n }\n}\nfunction errorWaitUntilNotAvailable() {\n throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), \"__NEXT_ERROR_CODE\", {\n value: \"E91\",\n enumerable: false,\n configurable: true\n });\n}\n\n//# sourceMappingURL=after-context.js.map","/**\n * Calls the given async function only when the returned promise-like object is\n * awaited. Afterwards, it provides the resolved value synchronously as `value`\n * property.\n */ export function createLazyResult(fn) {\n let pendingResult;\n const result = {\n then (onfulfilled, onrejected) {\n if (!pendingResult) {\n pendingResult = fn();\n }\n pendingResult.then((value)=>{\n result.value = value;\n }).catch(()=>{\n // The externally awaited result will be rejected via `onrejected`. We\n // don't need to handle it here. But we do want to avoid an unhandled\n // rejection.\n });\n return pendingResult.then(onfulfilled, onrejected);\n }\n };\n return result;\n}\nexport function isResolvedLazyResult(result) {\n return result.hasOwnProperty('value');\n}\n\n//# sourceMappingURL=lazy-result.js.map","import { AfterContext } from '../after/after-context';\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths';\nimport { createLazyResult } from '../lib/lazy-result';\nimport { getCacheHandlerEntries } from '../use-cache/handlers';\nimport { createSnapshot } from '../app-render/async-local-storage';\nexport function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) {\n /**\n * Rules of Static & Dynamic HTML:\n *\n * 1.) We must generate static HTML unless the caller explicitly opts\n * in to dynamic HTML support.\n *\n * 2.) If dynamic HTML support is requested, we must honor that request\n * or throw an error. It is the sole responsibility of the caller to\n * ensure they aren't e.g. requesting dynamic HTML for an AMP page.\n *\n * 3.) If the request is in draft mode, we must generate dynamic HTML.\n *\n * 4.) If the request is a server action, we must generate dynamic HTML.\n *\n * These rules help ensure that other existing features like request caching,\n * coalescing, and ISR continue working as intended.\n */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction;\n const isDevelopment = renderOpts.dev ?? false;\n const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is\n // when we are performing a static generation and we either are in debug\n // mode, or tracking fetch metrics was specifically opted into.\n isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1');\n const store = {\n isStaticGeneration,\n page,\n route: normalizeAppPath(page),\n incrementalCache: // we fallback to a global incremental cache for edge-runtime locally\n // so that it can access the fs cache without mocks\n renderOpts.incrementalCache || globalThis.__incrementalCache,\n cacheLifeProfiles: renderOpts.cacheLifeProfiles,\n isRevalidate: renderOpts.isRevalidate,\n isBuildTimePrerendering: renderOpts.nextExport,\n hasReadableErrorStacks: renderOpts.hasReadableErrorStacks,\n fetchCache: renderOpts.fetchCache,\n isOnDemandRevalidate: renderOpts.isOnDemandRevalidate,\n isDraftMode: renderOpts.isDraftMode,\n isPrefetchRequest,\n buildId,\n reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {},\n assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '',\n afterContext: createAfterContext(renderOpts),\n cacheComponentsEnabled: renderOpts.experimental.cacheComponents,\n dev: isDevelopment,\n previouslyRevalidatedTags,\n refreshTagsByCacheKind: createRefreshTagsByCacheKind(),\n runInCleanSnapshot: createSnapshot(),\n shouldTrackFetchMetrics\n };\n // TODO: remove this when we resolve accessing the store outside the execution context\n renderOpts.store = store;\n return store;\n}\nfunction createAfterContext(renderOpts) {\n const { waitUntil, onClose, onAfterTaskError } = renderOpts;\n return new AfterContext({\n waitUntil,\n onClose,\n onTaskError: onAfterTaskError\n });\n}\n/**\n * Creates a map with lazy results that refresh tags for the respective cache\n * kind when they're awaited for the first time.\n */ function createRefreshTagsByCacheKind() {\n const refreshTagsByCacheKind = new Map();\n const cacheHandlers = getCacheHandlerEntries();\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers){\n if ('refreshTags' in cacheHandler) {\n refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags()));\n }\n }\n }\n return refreshTagsByCacheKind;\n}\n\n//# sourceMappingURL=work-store.js.map","/** Monitor when the consumer finishes reading the response body.\nthat's as close as we can get to `res.on('close')` using web APIs.\n*/ export function trackBodyConsumed(body, onEnd) {\n if (typeof body === 'string') {\n const generator = async function* generate() {\n const encoder = new TextEncoder();\n yield encoder.encode(body);\n onEnd();\n };\n // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice\n return generator();\n } else {\n return trackStreamConsumed(body, onEnd);\n }\n}\nexport function trackStreamConsumed(stream, onEnd) {\n // NOTE: This function must handle `stream` being aborted or cancelled,\n // so it can't just be this:\n //\n // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } }))\n //\n // because that doesn't handle cancellations.\n // (and cancellation handling via `Transformer.cancel` is only available in node >20)\n const dest = new TransformStream();\n const runOnEnd = ()=>onEnd();\n stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd);\n return dest.readable;\n}\nexport class CloseController {\n onClose(callback) {\n if (this.isClosed) {\n throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), \"__NEXT_ERROR_CODE\", {\n value: \"E365\",\n enumerable: false,\n configurable: true\n });\n }\n this.target.addEventListener('close', callback);\n this.listeners++;\n }\n dispatchClose() {\n if (this.isClosed) {\n throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), \"__NEXT_ERROR_CODE\", {\n value: \"E229\",\n enumerable: false,\n configurable: true\n });\n }\n if (this.listeners > 0) {\n this.target.dispatchEvent(new Event('close'));\n }\n this.isClosed = true;\n }\n constructor(){\n this.target = new EventTarget();\n this.listeners = 0;\n this.isClosed = false;\n }\n}\n\n//# sourceMappingURL=web-on-close.js.map","/**\n * In edge runtime, these props directly accessed from environment variables.\n * - local: env vars will be injected through edge-runtime as runtime env vars\n * - deployment: env vars will be replaced by edge build pipeline\n */ export function getEdgePreviewProps() {\n return {\n previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '',\n previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '',\n previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || ''\n };\n}\n\n//# sourceMappingURL=get-edge-preview-props.js.map","import { createAsyncLocalStorage } from '../app-render/async-local-storage';\nexport function getBuiltinRequestContext() {\n const _globalThis = globalThis;\n const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL];\n return ctx == null ? void 0 : ctx.get();\n}\nconst NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context');\n/** \"@next/request-context\" has a different signature from AsyncLocalStorage,\n * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context).\n * We don't need a full AsyncContext adapter here, just having `.get()` is enough\n */ export function createLocalRequestContext() {\n const storage = createAsyncLocalStorage();\n return {\n get: ()=>storage.getStore(),\n run: (value, callback)=>storage.run(value, callback)\n };\n}\n\n//# sourceMappingURL=builtin-request-context.js.map","import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants';\nimport { getCacheHandlerEntries } from '../use-cache/handlers';\nimport { createLazyResult } from './lazy-result';\nconst getDerivedTags = (pathname)=>{\n const derivedTags = [\n `/layout`\n ];\n // we automatically add the current path segments as tags\n // for revalidatePath handling\n if (pathname.startsWith('/')) {\n const pathnameParts = pathname.split('/');\n for(let i = 1; i < pathnameParts.length + 1; i++){\n let curPathname = pathnameParts.slice(0, i).join('/');\n if (curPathname) {\n // all derived tags other than the page are layout tags\n if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) {\n curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`;\n }\n derivedTags.push(curPathname);\n }\n }\n }\n return derivedTags;\n};\n/**\n * Creates a map with lazy results that fetch the expiration value for the given\n * tags and respective cache kind when they're awaited for the first time.\n */ function createTagsExpirationsByCacheKind(tags) {\n const expirationsByCacheKind = new Map();\n const cacheHandlers = getCacheHandlerEntries();\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers){\n if ('getExpiration' in cacheHandler) {\n expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags)));\n }\n }\n }\n return expirationsByCacheKind;\n}\nexport async function getImplicitTags(page, url, fallbackRouteParams) {\n const tags = [];\n const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0;\n // Add the derived tags from the page.\n const derivedTags = getDerivedTags(page);\n for (let tag of derivedTags){\n tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`;\n tags.push(tag);\n }\n // Add the tags from the pathname. If the route has unknown params, we don't\n // want to add the pathname as a tag, as it will be invalid.\n if (url.pathname && !hasFallbackRouteParams) {\n const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`;\n tags.push(tag);\n }\n return {\n tags,\n expirationsByCacheKind: createTagsExpirationsByCacheKind(tags)\n };\n}\n\n//# sourceMappingURL=implicit-tags.js.map","/**\n * Normalizes the raw RSC header value. Only the literal string \"1\" is treated\n * as a valid RSC request marker; malformed or repeated values are ignored.\n */ export function isRSCRequestHeader(value) {\n return value === '1';\n}\n\n//# sourceMappingURL=is-rsc-request.js.map","import { PageSignatureError } from './error';\nimport { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils';\nimport { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event';\nimport { NextRequest } from './spec-extension/request';\nimport { NextResponse } from './spec-extension/response';\nimport { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url';\nimport { NextURL } from './next-url';\nimport { stripInternalSearchParams } from '../internal-utils';\nimport { normalizeRscURL } from '../../shared/lib/router/utils/app-paths';\nimport { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers';\nimport { ensureInstrumentationRegistered } from './globals';\nimport { createRequestStoreForAPI } from '../async-storage/request-store';\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external';\nimport { createWorkStore } from '../async-storage/work-store';\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers';\nimport { getTracer } from '../lib/trace/tracer';\nimport { MiddlewareSpan } from '../lib/trace/constants';\nimport { CloseController } from './web-on-close';\nimport { getEdgePreviewProps } from './get-edge-preview-props';\nimport { getBuiltinRequestContext } from '../after/builtin-request-context';\nimport { getImplicitTags } from '../lib/implicit-tags';\nimport { isRSCRequestHeader } from '../lib/is-rsc-request';\nexport class NextRequestHint extends NextRequest {\n constructor(params){\n super(params.input, params.init);\n this.sourcePage = params.page;\n }\n get request() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n respondWith() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n waitUntil() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n}\nconst headersGetter = {\n keys: (headers)=>Array.from(headers.keys()),\n get: (headers, key)=>headers.get(key) ?? undefined\n};\nlet propagator = (request, fn)=>{\n const tracer = getTracer();\n return tracer.withPropagatedContext(request.headers, fn, headersGetter);\n};\nlet testApisIntercepted = false;\nfunction ensureTestApisIntercepted() {\n if (!testApisIntercepted) {\n testApisIntercepted = true;\n if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') {\n const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm\n require('next/dist/experimental/testmode/server-edge');\n interceptTestApis();\n propagator = wrapRequestHandler(propagator);\n }\n }\n}\nexport async function adapter(params) {\n var _getBuiltinRequestContext;\n ensureTestApisIntercepted();\n await ensureInstrumentationRegistered();\n // TODO-APP: use explicit marker for this\n const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined';\n params.request.url = normalizeRscURL(params.request.url);\n const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, {\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator.\n // Instead we use the keys before iteration.\n const keys = [\n ...requestURL.searchParams.keys()\n ];\n for (const key of keys){\n const value = requestURL.searchParams.getAll(key);\n const normalizedKey = normalizeNextQueryParam(key);\n if (normalizedKey) {\n requestURL.searchParams.delete(normalizedKey);\n for (const val of value){\n requestURL.searchParams.append(normalizedKey, val);\n }\n requestURL.searchParams.delete(key);\n }\n }\n // Ensure users only see page requests, never data requests.\n let buildId = process.env.__NEXT_BUILD_ID || '';\n if ('buildId' in requestURL) {\n buildId = requestURL.buildId || '';\n requestURL.buildId = '';\n }\n const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers);\n const isNextDataRequest = requestHeaders.has('x-nextjs-data');\n const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER));\n if (isNextDataRequest && requestURL.pathname === '/index') {\n requestURL.pathname = '/';\n }\n const flightHeaders = new Map();\n // Headers should only be stripped for middleware\n if (!isEdgeRendering) {\n for (const header of FLIGHT_HEADERS){\n const value = requestHeaders.get(header);\n if (value !== null) {\n flightHeaders.set(header, value);\n requestHeaders.delete(header);\n }\n }\n }\n const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL;\n const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY);\n const request = new NextRequestHint({\n page: params.page,\n // Strip internal query parameters off the request.\n input: stripInternalSearchParams(normalizeURL).toString(),\n init: {\n body: params.request.body,\n headers: requestHeaders,\n method: params.request.method,\n nextConfig: params.request.nextConfig,\n signal: params.request.signal\n }\n });\n /**\n * This allows to identify the request as a data request. The user doesn't\n * need to know about this property neither use it. We add it for testing\n * purposes.\n */ if (isNextDataRequest) {\n Object.defineProperty(request, '__isData', {\n enumerable: false,\n value: true\n });\n }\n if (// If we are inside of the next start sandbox\n // leverage the shared instance if not we need\n // to create a fresh cache instance each time\n !globalThis.__incrementalCacheShared && params.IncrementalCache) {\n ;\n globalThis.__incrementalCache = new params.IncrementalCache({\n CurCacheHandler: params.incrementalCacheHandler,\n minimalMode: process.env.NODE_ENV !== 'development',\n fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX,\n dev: process.env.NODE_ENV === 'development',\n requestHeaders: params.request.headers,\n getPrerenderManifest: ()=>{\n return {\n version: -1,\n routes: {},\n dynamicRoutes: {},\n notFoundRoutes: [],\n preview: getEdgePreviewProps()\n };\n }\n });\n }\n // if we're in an edge runtime sandbox, we should use the waitUntil\n // that we receive from the enclosing NextServer\n const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil);\n const event = new NextFetchEvent({\n request,\n page: params.page,\n context: outerWaitUntil ? {\n waitUntil: outerWaitUntil\n } : undefined\n });\n let response;\n let cookiesFromResponse;\n response = await propagator(request, ()=>{\n // we only care to make async storage available for middleware\n const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware';\n if (isMiddleware) {\n // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`),\n // so we have to inject it via DefinePlugin.\n // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`).\n const waitUntil = event.waitUntil.bind(event);\n const closeController = new CloseController();\n return getTracer().trace(MiddlewareSpan.execute, {\n spanName: `middleware ${request.method} ${request.nextUrl.pathname}`,\n attributes: {\n 'http.target': request.nextUrl.pathname,\n 'http.method': request.method\n }\n }, async ()=>{\n try {\n var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1;\n const onUpdateCookies = (cookies)=>{\n cookiesFromResponse = cookies;\n };\n const previewProps = getEdgePreviewProps();\n const page = '/' // Fake Work\n ;\n const fallbackRouteParams = null;\n const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams);\n const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps);\n const workStore = createWorkStore({\n page,\n renderOpts: {\n cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife,\n experimental: {\n isRoutePPREnabled: false,\n cacheComponents: false,\n authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts)\n },\n supportsDynamicResponse: true,\n waitUntil,\n onClose: closeController.onClose.bind(closeController),\n onAfterTaskError: undefined\n },\n isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1',\n buildId: buildId ?? '',\n previouslyRevalidatedTags: []\n });\n return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event));\n } finally{\n // middleware cannot stream, so we can consider the response closed\n // as soon as the handler returns.\n // we can delay running it until a bit later --\n // if it's needed, we'll have a `waitUntil` lock anyway.\n setTimeout(()=>{\n closeController.dispatchClose();\n }, 0);\n }\n });\n }\n return params.handler(request, event);\n });\n // check if response is a Response object\n if (response && !(response instanceof Response)) {\n throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), \"__NEXT_ERROR_CODE\", {\n value: \"E567\",\n enumerable: false,\n configurable: true\n });\n }\n if (response && cookiesFromResponse) {\n response.headers.set('set-cookie', cookiesFromResponse);\n }\n /**\n * For rewrites we must always include the locale in the final pathname\n * so we re-create the NextURL forcing it to include it when the it is\n * an internal rewrite. Also we make sure the outgoing rewrite URL is\n * a data URL if the request was a data request.\n */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite');\n if (response && rewrite && (isRSCRequest || !isEdgeRendering)) {\n const destination = new NextURL(rewrite, {\n forceLocale: true,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) {\n if (destination.host === request.nextUrl.host) {\n destination.buildId = buildId || destination.buildId;\n response.headers.set('x-middleware-rewrite', String(destination));\n }\n }\n /**\n * When the request is a data request we must show if there was a rewrite\n * with an internal header so the client knows which component to load\n * from the data request.\n */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString());\n if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite\n // resolving config is enabled don't add this header\n // so the upstream app can set it instead\n !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\\/\\//))) {\n response.headers.set('x-nextjs-rewrite', relativeDestination);\n }\n // If this is an RSC request, and the pathname or search has changed, and\n // this isn't an external rewrite, we need to set the rewritten pathname and\n // query headers.\n if (isRSCRequest && isRelative) {\n if (requestURL.pathname !== destination.pathname) {\n response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname);\n }\n if (requestURL.search !== destination.search) {\n response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string\n destination.search.slice(1));\n }\n }\n }\n /**\n * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests,\n * unless it's already present. This is necessary to ensure that RSC hash validation\n * works correctly after a rewrite. For internal rewrites, the server can validate the\n * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical.\n * However, for external rewrites (where the request is proxied to another Next.js server),\n * the external server does not have access to the original URL or its search parameters.\n * In these cases, forwarding the `_rsc` parameter is essential so that the external server\n * can perform the correct RSC hash validation.\n */ if (response && rewrite && isRSCRequest && rscHash) {\n const rewriteURL = new URL(rewrite);\n if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) {\n rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash);\n response.headers.set('x-middleware-rewrite', rewriteURL.toString());\n }\n }\n /**\n * For redirects we will not include the locale in case when it is the\n * default and we must also make sure the outgoing URL is a data one if\n * the incoming request was a data request.\n */ const redirect = response == null ? void 0 : response.headers.get('Location');\n if (response && redirect && !isEdgeRendering) {\n const redirectURL = new NextURL(redirect, {\n forceLocale: false,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n /**\n * Responses created from redirects have immutable headers so we have\n * to clone the response to be able to modify it.\n */ response = new Response(response.body, response);\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) {\n if (redirectURL.host === requestURL.host) {\n redirectURL.buildId = buildId || redirectURL.buildId;\n response.headers.set('Location', redirectURL.toString());\n }\n }\n /**\n * When the request is a data request we can't use the location header as\n * it may end up with CORS error. Instead we map to an internal header so\n * the client knows the destination.\n */ if (isNextDataRequest) {\n response.headers.delete('Location');\n response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString()));\n }\n }\n const finalResponse = response ? response : NextResponse.next();\n // Flight headers are not overridable / removable so they are applied at the end.\n const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers');\n const overwrittenHeaders = [];\n if (middlewareOverrideHeaders) {\n for (const [key, value] of flightHeaders){\n finalResponse.headers.set(`x-middleware-request-${key}`, value);\n overwrittenHeaders.push(key);\n }\n if (overwrittenHeaders.length > 0) {\n finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(','));\n }\n }\n return {\n response: finalResponse,\n waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(),\n fetchMetrics: request.fetchMetrics\n };\n}\n\n//# sourceMappingURL=adapter.js.map","import parseua from 'next/dist/compiled/ua-parser-js';\nexport function isBot(input) {\n return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input);\n}\nexport function userAgentFromString(input) {\n return {\n ...parseua(input),\n isBot: input === undefined ? false : isBot(input)\n };\n}\nexport function userAgent({ headers }) {\n return userAgentFromString(headers.get('user-agent') || undefined);\n}\n\n//# sourceMappingURL=user-agent.js.map","const GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js\ntypeof URLPattern === 'undefined' ? undefined : URLPattern;\nexport { GlobalURLPattern as URLPattern };\n\n//# sourceMappingURL=url-pattern.js.map","import { workAsyncStorage } from '../app-render/work-async-storage.external';\n/**\n * This function allows you to schedule callbacks to be executed after the current request finishes.\n */ export function after(task) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore\n throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), \"__NEXT_ERROR_CODE\", {\n value: \"E468\",\n enumerable: false,\n configurable: true\n });\n }\n const { afterContext } = workStore;\n return afterContext.after(task);\n}\n\n//# sourceMappingURL=after.js.map","export * from './after';\n\n//# sourceMappingURL=index.js.map","const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n","const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n","export function isHangingPromiseRejectionError(err) {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false;\n }\n return err.digest === HANGING_PROMISE_REJECTION;\n}\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION';\nclass HangingPromiseRejectionError extends Error {\n constructor(route, expression){\n super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;\n }\n}\nconst abortListenersBySignal = new WeakMap();\n/**\n * This function constructs a promise that will never resolve. This is primarily\n * useful for cacheComponents where we use promise resolution timing to determine which\n * parts of a render can be included in a prerender.\n *\n * @internal\n */ export function makeHangingPromise(signal, route, expression) {\n if (signal.aborted) {\n return Promise.reject(new HangingPromiseRejectionError(route, expression));\n } else {\n const hangingPromise = new Promise((_, reject)=>{\n const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression));\n let currentListeners = abortListenersBySignal.get(signal);\n if (currentListeners) {\n currentListeners.push(boundRejection);\n } else {\n const listeners = [\n boundRejection\n ];\n abortListenersBySignal.set(signal, listeners);\n signal.addEventListener('abort', ()=>{\n for(let i = 0; i < listeners.length; i++){\n listeners[i]();\n }\n }, {\n once: true\n });\n }\n });\n // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so\n // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct\n // your own promise out of it you'll need to ensure you handle the error when it rejects.\n hangingPromise.catch(ignoreReject);\n return hangingPromise;\n }\n}\nfunction ignoreReject() {}\nexport function makeDevtoolsIOAwarePromise(underlying) {\n // in React DevTools if we resolve in a setTimeout we will observe\n // the promise resolution as something that can suspend a boundary or root.\n return new Promise((resolve)=>{\n // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n setTimeout(()=>{\n resolve(underlying);\n }, 0);\n });\n}\n\n//# sourceMappingURL=dynamic-rendering-utils.js.map","export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__';\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__';\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__';\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__';\n\n//# sourceMappingURL=boundary-constants.js.map","// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n","/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n","import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n","import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n","// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n","import { createAsyncLocalStorage } from './async-local-storage';\nexport const actionAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=action-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { actionAsyncStorageInstance } from './action-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { actionAsyncStorageInstance as actionAsyncStorage };\n\n//# sourceMappingURL=action-async-storage.external.js.map","// ISC License\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\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// 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\nvar _globalThis;\nconst { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {};\nconst enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || (stdout == null ? void 0 : stdout.isTTY) && !env.CI && env.TERM !== 'dumb');\nconst replaceClose = (str, close, replace, index)=>{\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 ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\nconst formatter = (open, close, replace = open)=>{\n if (!enabled) return String;\n return (input)=>{\n const string = '' + input;\n const index = string.indexOf(close, open.length);\n return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;\n };\n};\nexport const reset = enabled ? (s)=>`\\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\n//# sourceMappingURL=picocolors.js.map","import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors';\nimport { LRUCache } from '../../server/lib/lru-cache';\nexport const prefixes = {\n wait: white(bold('○')),\n error: red(bold('⨯')),\n warn: yellow(bold('⚠')),\n ready: '▲',\n info: white(bold(' ')),\n event: green(bold('✓')),\n trace: magenta(bold('»'))\n};\nconst LOGGING_METHOD = {\n log: 'log',\n warn: 'warn',\n error: 'error'\n};\nfunction prefixedLog(prefixType, ...message) {\n if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n message.shift();\n }\n const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log';\n const prefix = prefixes[prefixType];\n // If there's no message, don't print the prefix but a new line\n if (message.length === 0) {\n console[consoleMethod]('');\n } else {\n // Ensure if there's ANSI escape codes it's concatenated into one string.\n // Chrome DevTool can only handle color if it's in one string.\n if (message.length === 1 && typeof message[0] === 'string') {\n console[consoleMethod](' ' + prefix + ' ' + message[0]);\n } else {\n console[consoleMethod](' ' + prefix, ...message);\n }\n }\n}\nexport function bootstrap(...message) {\n // logging format: ' '\n // e.g. ' ✓ Compiled successfully'\n // Add spaces to align with the indent of other logs\n console.log(' ' + message.join(' '));\n}\nexport function wait(...message) {\n prefixedLog('wait', ...message);\n}\nexport function error(...message) {\n prefixedLog('error', ...message);\n}\nexport function warn(...message) {\n prefixedLog('warn', ...message);\n}\nexport function ready(...message) {\n prefixedLog('ready', ...message);\n}\nexport function info(...message) {\n prefixedLog('info', ...message);\n}\nexport function event(...message) {\n prefixedLog('event', ...message);\n}\nexport function trace(...message) {\n prefixedLog('trace', ...message);\n}\nconst warnOnceCache = new LRUCache(10000, (value)=>value.length);\nexport function warnOnce(...message) {\n const key = message.join(' ');\n if (!warnOnceCache.has(key)) {\n warnOnceCache.set(key, key);\n warn(...message);\n }\n}\n\n//# sourceMappingURL=log.js.map","import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n","// Alias index file of next/server for edge runtime for tree-shaking purpose\nexport { ImageResponse } from '../spec-extension/image-response';\nexport { NextRequest } from '../spec-extension/request';\nexport { NextResponse } from '../spec-extension/response';\nexport { userAgent, userAgentFromString } from '../spec-extension/user-agent';\nexport { URLPattern } from '../spec-extension/url-pattern';\nexport { after } from '../../after';\nexport { connection } from '../../request/connection';\nexport { unstable_rootParams } from '../../request/root-params';\n\n//# sourceMappingURL=index.js.map","export * from '../server/web/exports/index';\n\n//# sourceMappingURL=server.js.map","import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n","export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n","export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n","import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n","import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n","import \"next/dist/server/web/globals\";\nimport { adapter } from \"next/dist/server/web/adapter\";\n// Import the userland code.\nimport * as _mod from \"private-next-root-dir/src/middleware.js\";\nimport { edgeInstrumentationOnRequestError } from \"next/dist/server/web/globals\";\nimport { isNextRouterError } from \"next/dist/client/components/is-next-router-error\";\nconst mod = {\n ..._mod\n};\nconst handler = mod.middleware || mod.default;\nconst page = \"/src/middleware\";\nif (typeof handler !== 'function') {\n throw Object.defineProperty(new Error(`The Middleware \"${page}\" must export a \\`middleware\\` or a \\`default\\` function`), \"__NEXT_ERROR_CODE\", {\n value: \"E120\",\n enumerable: false,\n configurable: true\n });\n}\n// Middleware will only sent out the FetchEvent to next server,\n// so load instrumentation module here and track the error inside middleware module.\nfunction errorHandledHandler(fn) {\n return async (...args)=>{\n try {\n return await fn(...args);\n } catch (err) {\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in middleware as it's outside of react component tree.\n if (process.env.NODE_ENV !== 'production') {\n if (isNextRouterError(err)) {\n err.message = `Next.js navigation API is not allowed to be used in Middleware.`;\n throw err;\n }\n }\n const req = args[0];\n const url = new URL(req.url);\n const resource = url.pathname + url.search;\n await edgeInstrumentationOnRequestError(err, {\n path: resource,\n method: req.method,\n headers: Object.fromEntries(req.headers.entries())\n }, {\n routerKind: 'Pages Router',\n routePath: '/middleware',\n routeType: 'middleware',\n revalidateReason: undefined\n });\n throw err;\n }\n };\n}\nexport default function nHandler(opts) {\n return adapter({\n ...opts,\n page,\n handler: errorHandledHandler(handler)\n });\n}\n\n//# sourceMappingURL=middleware.js.map\n","(()=>{\"use strict\";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n=\"~\";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!==\"function\"){throw new TypeError(\"The listener must be a function\")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t[\"default\"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t[\"default\"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name=\"TimeoutError\"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!==\"number\"||t<0){throw new TypeError(\"Expected `milliseconds` to be a positive number\")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n===\"function\"){try{i(n())}catch(e){s(e)}return}const r=typeof n===\"string\"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel===\"function\"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports[\"default\"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};(()=>{var e=n;Object.defineProperty(e,\"__esModule\",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap===\"number\"&&e.intervalCap>=1)){throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:\"\"}\\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:\"\"}\\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit(\"active\");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e===\"number\"&&e>=1)){throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit(\"add\")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e[\"default\"]=PQueue})();module.exports=n})();","module.exports = require(\"node:buffer\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n getTestReqInfo: null,\n withRequest: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n getTestReqInfo: function() {\n return getTestReqInfo;\n },\n withRequest: function() {\n return withRequest;\n }\n});\nconst _nodeasync_hooks = require(\"node:async_hooks\");\nconst testStorage = new _nodeasync_hooks.AsyncLocalStorage();\nfunction extractTestInfoFromRequest(req, reader) {\n const proxyPortHeader = reader.header(req, 'next-test-proxy-port');\n if (!proxyPortHeader) {\n return undefined;\n }\n const url = reader.url(req);\n const proxyPort = Number(proxyPortHeader);\n const testData = reader.header(req, 'next-test-data') || '';\n return {\n url,\n proxyPort,\n testData\n };\n}\nfunction withRequest(req, reader, fn) {\n const testReqInfo = extractTestInfoFromRequest(req, reader);\n if (!testReqInfo) {\n return fn();\n }\n return testStorage.run(testReqInfo, fn);\n}\nfunction getTestReqInfo(req, reader) {\n const testReqInfo = testStorage.getStore();\n if (testReqInfo) {\n return testReqInfo;\n }\n if (req && reader) {\n return extractTestInfoFromRequest(req, reader);\n }\n return undefined;\n}\n\n//# sourceMappingURL=context.js.map","/**\n * @license React\n * react.react-server.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar ReactSharedInternals = { H: null, A: null };\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty,\n assign = Object.assign;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n formatProdErrorMessage(\n 31,\n \"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array\n )\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nfunction createCacheRoot() {\n return new WeakMap();\n}\nfunction createCacheNode() {\n return { s: 0, v: void 0, o: null, p: null };\n}\nexports.Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children)) throw Error(formatProdErrorMessage(143));\n return children;\n }\n};\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.cache = function (fn) {\n return function () {\n var dispatcher = ReactSharedInternals.A;\n if (!dispatcher) return fn.apply(null, arguments);\n var fnMap = dispatcher.getCacheForType(createCacheRoot);\n dispatcher = fnMap.get(fn);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));\n fnMap = 0;\n for (var l = arguments.length; fnMap < l; fnMap++) {\n var arg = arguments[fnMap];\n if (\n \"function\" === typeof arg ||\n (\"object\" === typeof arg && null !== arg)\n ) {\n var objectCache = dispatcher.o;\n null === objectCache && (dispatcher.o = objectCache = new WeakMap());\n dispatcher = objectCache.get(arg);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher));\n } else\n (objectCache = dispatcher.p),\n null === objectCache && (dispatcher.p = objectCache = new Map()),\n (dispatcher = objectCache.get(arg)),\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()),\n objectCache.set(arg, dispatcher));\n }\n if (1 === dispatcher.s) return dispatcher.v;\n if (2 === dispatcher.s) throw dispatcher.v;\n try {\n var result = fn.apply(null, arguments);\n fnMap = dispatcher;\n fnMap.s = 1;\n return (fnMap.v = result);\n } catch (error) {\n throw ((result = dispatcher), (result.s = 2), (result.v = error), error);\n }\n };\n};\nexports.cacheSignal = function () {\n var dispatcher = ReactSharedInternals.A;\n return dispatcher ? dispatcher.cacheSignal() : null;\n};\nexports.captureOwnerStack = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(formatProdErrorMessage(267, element));\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useDebugValue = function () {};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.version = \"19.2.0-canary-0bdb9206-20250818\";\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1;\n }\n if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n cookiesSeparatorFound = true;\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n constructor(requestHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n this._headers = requestHeaders;\n const header = requestHeaders.get(\"cookie\");\n if (header) {\n const parsed = parseCookie(header);\n for (const [name, value] of parsed) {\n this._parsed.set(name, { name, value });\n }\n }\n }\n [Symbol.iterator]() {\n return this._parsed[Symbol.iterator]();\n }\n /**\n * The amount of cookies received from the client\n */\n get size() {\n return this._parsed.size;\n }\n get(...args) {\n const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(name);\n }\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed);\n if (!args.length) {\n return all.map(([_, value]) => value);\n }\n const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter(([n]) => n === name).map(([_, value]) => value);\n }\n has(name) {\n return this._parsed.has(name);\n }\n set(...args) {\n const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n const map = this._parsed;\n map.set(name, { name, value });\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n );\n return this;\n }\n /**\n * Delete the cookies matching the passed name or names in the request.\n */\n delete(names) {\n const map = this._parsed;\n const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n );\n return result;\n }\n /**\n * Delete all the cookies in the cookies in the request.\n */\n clear() {\n this.delete(Array.from(this._parsed.keys()));\n return this;\n }\n /**\n * Format the cookies in the request as a string for logging\n */\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n constructor(responseHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n var _a, _b, _c;\n this._headers = responseHeaders;\n const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n for (const cookieString of cookieStrings) {\n const parsed = parseSetCookie(cookieString);\n if (parsed)\n this._parsed.set(parsed.name, parsed);\n }\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n */\n get(...args) {\n const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(key);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n */\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed.values());\n if (!args.length) {\n return all;\n }\n const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter((c) => c.name === key);\n }\n has(name) {\n return this._parsed.has(name);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n */\n set(...args) {\n const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n const map = this._parsed;\n map.set(name, normalizeCookie({ name, value, ...cookie }));\n replace(map, this._headers);\n return this;\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n */\n delete(...args) {\n const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n }\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n }\n};\nfunction replace(bag, headers) {\n headers.delete(\"set-cookie\");\n for (const [, value] of bag) {\n const serialized = stringifyCookie(value);\n headers.append(\"set-cookie\", serialized);\n }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n if (typeof cookie.expires === \"number\") {\n cookie.expires = new Date(cookie.expires);\n }\n if (cookie.maxAge) {\n cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n }\n if (cookie.path === null || cookie.path === void 0) {\n cookie.path = \"/\";\n }\n return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestCookies,\n ResponseCookies,\n parseCookie,\n parseSetCookie,\n stringifyCookie\n});\n","(()=>{var i={226:function(i,e){(function(o,a){\"use strict\";var r=\"1.0.35\",t=\"\",n=\"?\",s=\"function\",b=\"undefined\",w=\"object\",l=\"string\",d=\"major\",c=\"model\",u=\"name\",p=\"type\",m=\"vendor\",f=\"version\",h=\"architecture\",v=\"console\",g=\"mobile\",k=\"tablet\",x=\"smarttv\",_=\"wearable\",y=\"embedded\",q=350;var T=\"Amazon\",S=\"Apple\",z=\"ASUS\",N=\"BlackBerry\",A=\"Browser\",C=\"Chrome\",E=\"Edge\",O=\"Firefox\",U=\"Google\",j=\"Huawei\",P=\"LG\",R=\"Microsoft\",M=\"Motorola\",B=\"Opera\",V=\"Samsung\",D=\"Sharp\",I=\"Sony\",W=\"Viera\",F=\"Xiaomi\",G=\"Zebra\",H=\"Facebook\",L=\"Chromium OS\",Z=\"Mac OS\";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]=\"iPad\";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!=\"Unknown\"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if(\"object\"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window===\"object\"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var o=__nccwpck_require__(226);module.exports=o})();","module.exports = require(\"node:async_hooks\");","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var r=e;\n/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function parse(e,r){if(typeof e!==\"string\"){throw new TypeError(\"argument str must be a string\")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn));\n}\n\n//# sourceMappingURL=server-edge.js.map","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.react-server.production.js');\n} else {\n module.exports = require('./cjs/react.react-server.development.js');\n}\n","(()=>{\"use strict\";var e={491:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i=\"context\";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c=\"diag\";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)(\"diag\");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r===\"number\"){r={logLevel:r}}const u=(0,i.getGlobal)(\"diag\");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:\"\";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)(\"diag\",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy(\"verbose\");e.debug=_logProxy(\"debug\");e.info=_logProxy(\"info\");e.warn=_logProxy(\"warn\");e.error=_logProxy(\"error\")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i=\"metrics\";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u=\"propagation\";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s=\"trace\";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)(\"OpenTelemetry Baggage Key\");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol(\"BaggageEntryMetadata\")},369:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!==\"string\"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=\"\"}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||\"DiagComponentLogger\"}debug(...e){return logProxy(\"debug\",this._namespace,e)}error(...e){return logProxy(\"error\",this._namespace,e)}info(...e){return logProxy(\"info\",this._namespace,e)}warn(...e){return logProxy(\"warn\",this._namespace,e)}verbose(...e){return logProxy(\"verbose\",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)(\"diag\");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:\"error\",c:\"error\"},{n:\"warn\",c:\"warn\"},{n:\"info\",c:\"info\"},{n:\"debug\",c:\"debug\"},{n:\"verbose\",c:\"trace\"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!==\"function\"){r=console.log}if(typeof r===\"function\"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,\"__esModule\",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a===\"function\"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc(\"error\",n.DiagLogLevel.ERROR),warn:_filterFunc(\"warn\",n.DiagLogLevel.WARN),info:_filterFunc(\"info\",n.DiagLogLevel.INFO),debug:_filterFunc(\"debug\",n.DiagLogLevel.DEBUG),verbose:_filterFunc(\"verbose\",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"ERROR\"]=30]=\"ERROR\";e[e[\"WARN\"]=50]=\"WARN\";e[e[\"INFO\"]=60]=\"INFO\";e[e[\"DEBUG\"]=70]=\"DEBUG\";e[e[\"VERBOSE\"]=80]=\"VERBOSE\";e[e[\"ALL\"]=9999]=\"ALL\"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(\".\")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ValueType=void 0;var r;(function(e){e[e[\"INT\"]=0]=\"INT\";e[e[\"DOUBLE\"]=1]=\"DOUBLE\"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis===\"object\"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e===\"object\"&&typeof e[\"spanId\"]===\"string\"&&typeof e[\"traceId\"]===\"string\"&&typeof e[\"traceFlags\"]===\"number\"}},124:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e[\"NOT_RECORD\"]=0]=\"NOT_RECORD\";e[e[\"RECORD\"]=1]=\"RECORD\";e[e[\"RECORD_AND_SAMPLED\"]=2]=\"RECORD_AND_SAMPLED\"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)(\"OpenTelemetry Context Key SPAN\");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=\",\";const c=\"=\";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.validateValue=t.validateKey=void 0;const r=\"[_0-9a-z-*/]\";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID=\"0000000000000000\";t.INVALID_TRACEID=\"00000000000000000000000000000000\";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanKind=void 0;var r;(function(e){e[e[\"INTERNAL\"]=0]=\"INTERNAL\";e[e[\"SERVER\"]=1]=\"SERVER\";e[e[\"CLIENT\"]=2]=\"CLIENT\";e[e[\"PRODUCER\"]=3]=\"PRODUCER\";e[e[\"CONSUMER\"]=4]=\"CONSUMER\"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e[\"UNSET\"]=0]=\"UNSET\";e[e[\"OK\"]=1]=\"OK\";e[e[\"ERROR\"]=2]=\"ERROR\"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"SAMPLED\"]=1]=\"SAMPLED\"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.VERSION=void 0;t.VERSION=\"1.6.0\"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var r={};(()=>{var e=r;Object.defineProperty(e,\"__esModule\",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,\"baggageEntryMetadataFromString\",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,\"createContextKey\",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,\"ROOT_CONTEXT\",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,\"DiagConsoleLogger\",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,\"DiagLogLevel\",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,\"createNoopMeter\",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,\"ValueType\",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,\"defaultTextMapGetter\",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,\"defaultTextMapSetter\",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,\"ProxyTracer\",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,\"ProxyTracerProvider\",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,\"SamplingDecision\",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,\"SpanKind\",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,\"SpanStatusCode\",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,\"TraceFlags\",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,\"createTraceState\",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,\"isSpanContextValid\",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,\"isValidTraceId\",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,\"isValidSpanId\",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,\"INVALID_SPANID\",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,\"INVALID_TRACEID\",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,\"INVALID_SPAN_CONTEXT\",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,\"context\",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,\"diag\",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,\"metrics\",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,\"propagation\",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,\"trace\",{enumerable:true,get:function(){return C.trace}});e[\"default\"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale","removeTrailingSlash","route","replace","parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice","addPathPrefix","prefix","startsWith","addPathSuffix","suffix","pathHasPrefix","addLocale","ignorePrefix","lower","formatNextPathnameInfo","info","buildId","trailingSlash","basePath","endsWith","getHostname","parsed","headers","host","Array","isArray","toString","cache","WeakMap","normalizeLocalePath","lowercasedLocales","get","map","set","segments","segment","index","length","removePathPrefix","withoutPrefix","getNextPathnameInfo","options","i18n","nextConfig","pathnameNoDataPrefix","paths","join","parseData","result","i18nProvider","analyze","parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","getRelativeURL","RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","ensureLeadingSlash","isGroupSegment","isParallelRouteSegment","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY","normalizeAppPath","reduce","normalizeRscURL","isThenable","promise","then","InvariantError","Error","constructor","message","name","tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","LRUCache","memoryCache","entry","size","pendingSets","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","DefaultCacheHandler","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","revalidate","returnStream","newSaved","value","tee","expire","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","expireTags","round","DYNAMIC_ERROR_CODE","DynamicServerError","description","digest","isDynamicServerError","NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","code","isStaticGenBailoutError","error","BAILOUT_TO_CSR","BailoutToCSRError","reason","isBailoutToCSRError","React","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","postponeWithTracking","dynamicTracking","dynamicUsageDescription","dynamicUsageStack","stack","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","createPrerenderInterruptedError","controller","abort","push","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","isDynamicPostponeReason","NEXT_PRERENDER_INTERRUPTED","isPrerenderInterruptedError","accessedDynamicData","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","line","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","constructorOpt","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","rootTaskSpawnPhase","throwForMissingRequestStore","makeDevtoolsIOAwarePromise","connection","callingExpression","phase","isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set","actionAsyncStorage","warnOnce","CachedParams","unstable_rootParams","createPrerenderRootParams","rootParams","underlyingParams","exportName","key","has","cachedParams","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","defineProperty","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","createPrerenderRootParamPromise","makeErroringRootParamPromise","NextResponse","WINDOW_MS","MAX_PER_WINDOW","hits","getClientIp","request","trim","checkRateLimitLocal","windowMs","Date","timestamps","t","allowed","remaining","reset","ceil","middleware","nextUrl","next","ip","useRedis","REDIS_URL","COSMIC_REDIS_ENABLED","status","String","response","config","matcher","HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","httpStatus","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","errorCode","destination","at","statusCode","isNaN","isNextRouterError"]} ?@src/middleware.js.mapwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource ' //# sourceMappingURL=middleware.js.map T{"version":3,"file":"src/middleware.js","mappings":"8GACA,qCAA6C,CAC7C,QACA,CAAC,EAAC,CAMF,cACA,0CACA,cACA,SACK,CACL,EACA,GACA,uBACA,QACA,CAAK,CACL,0BACA,QACA,CAAK,CACL,kBACA,QACA,CACA,CAAC,EACD,MAAiB,EAAQ,GAAW,EACpC,GACA,OACA,MAEA,cACA,gBAEA,EAkBA,sBACA,QAAY,6GAAsG,EAClH,OACA,WACA,YACA,SACA,MACA,SACA,YACA,cACA,CACA,kBACA,WA5BA,sCAEA,YAAmB,WAAkB,IACrC,kBACA,aACA,KACA,CAQA,OADA,GAFA,EAFA,4CAEA,YAEA,2DACA,YACA,IAcA,CACA,CACA,OAAyB,EAAM,oDAC/B,QACA,cACA,YACA,OACA,WACA,WACA,gBACA,CACA,CACA,CAQA,sBACA,gCACA,MAEA,YAEA,aAAY,eAAsB,EAClC,eACA,8BAAyD,EAAU,GACnE,cACA,uBACA,MAEA,WACA,CACA,CAAK,EACL,SACA,2DAAuE,SAAY,wBACnF,aACA,cACA,eACA,CAAS,EAET,qBACA,KAAY,GAAM,EAClB,UACA,eACA,WACA,aACA,gBACA,4DAA4E,UAAgB,EAAE,MAAY,yBAC1G,aACA,cACA,eACA,CAAa,CACb,aAzCA,WAAY,oBAAwB,WACpC,sBAA+B,EAAM,uBACrC,SACA,sBACA,CAAK,CAuCL,SACA,QACA,CACA,CACA,cAUA,OATI,GAAM,qBACV,YAGA,8CACA,OAEA,qBACA,EACA,KACQ,GAAM,QACd,CACA,kCoCxIA,qCuCWA,O1EdO,mBAEP,MADA,wJAGA,WACA,mBAEA,2DACA,IACA,QAEA,cACA,6BACA,IACA,kBACA,CAAU,SAEV,MADA,mEAAmF,UAAY,EAC/F,CACA,CAEA,CACO,uBACP,gBACA,IACA,KACA,kEACA,CAAM,SAEN,2DACA,CACA,CACA,WACO,aAIP,OAHA,GACA,QAEA,CACA,CACA,cAEA,oDAAyD,EAAO;AAChE,0EAyCA,UAAoB,GAAM,WAE1B,YAAsB,GAAM,aACpB,GAAM,kBAId,IACA,yDACA,MAhDA,YACA,4BAAyC,EACzC,SACA,cACA,QAEA,8DACA,aACA,cACA,eACA,CAAa,CACb,CAAS,CACT,YACA,6DACA,aACA,cACA,eACA,CAAa,CACb,CAAS,CACT,aACA,2BACA,cAEA,8DACA,aACA,cACA,eACA,CAAa,CACb,CACA,CAAK,EACL,mBAAuB,EACvB,SACA,CAAK,CACL,EAgBA,cACA,eACA,CAAS,CACT,CAAM,OAEN,GCjGO,uBACP,kBAAkB,EAAM,EACxB,yBAAiC,EAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,IACA,CACA,CACO,sBACP,cACA;AACA;AACA,IACA,CACA,CACO,sBACP,cACA;AACA;AACA,IACA,CACA,CCAO,cAoDP,GAGA,gBAIA,4BAGA,0BAGA,+BAGA,mBAGA,mBAGA,wBAGA,wBAGA,uBAGA,oCAGA,oCAGA,8BAGA,6BACA,ECpFU,cACV,IAEA,EACA,EACA,EACA,EACA,EANA,KACA,IAMA,aACA,yCACA,KAEA,kBAMA,kBAGA,IAFA,IACA,KACA,KAEA,SADA,gBACA,CAMA,IAJA,IACA,KACA,IACA,IACA,YAbA,MADA,iBACA,EAAsC,IAAtC,GAAsC,SActC,IAGA,gCAEA,KAEA,IACA,yBACA,KAIA,KAEA,EAAc,IACd,IAGA,oBACA,+BAEA,CACA,QACA,CAOW,cACX,SACA,KACA,KACA,2BACA,gCAIA,gBACA,0BAEA,OAIA,QACA,CAGW,cACX,IACA,iCACA,CAAM,SACN,uDAAmE,UAAY,+FAC/E,OACA,CAAS,uBACT,YACA,cACA,eACA,CAAS,CACT,CACA,CDRA,EACA,KACA,OACA,cACA,wBACA,gBACA,CACA,YACA,wBACA,gBACA,aACA,aACA,CACA,eAEA,UACA,UACA,CACA,YACA,sBACA,kBACA,CACA,SACA,wBACA,gBACA,sBACA,kBACA,SACA,aACA,aACA,CACA,UAEA,wBACA,sBACA,kBACA,gBACA,EAEA,EE7JA,yBACA,wBACA,qBACA,SACA,iBACA,WACA,WACA,gBACA,UACA,EAAU,CACV,gBACA,YAEA,CAEA,eACA,SACA,4BAEA,CAEA,yBACA,UACA,CACA,aACA,6BAIA,MADA,qBACA,GAIA,wBAEA,CACA,CAIO,kBACP,eACA,MACA,wDACA,uBAMA,cACA,gCAAwC,EAAkB,CAC1D,eAD0D,KAC1D,CACS,uBACT,aACA,cACA,eACA,CAAS,CACT,CAKA,cACA,gCAAwC,EAAkB,CAC1D,eAD0D,KAE1D,CAAS,uBACT,aACA,cACA,eACA,CAAS,CACT,CACA,CElEO,SAASA,EAAoBC,CAAa,EAC/C,OAAOA,EAAMC,OAAO,CAAC,MAAO,KAAO,GACrC,CCJO,SAASC,EAAUC,CAAY,EACpC,IAAMC,EAAYD,EAAKE,OAA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,eACA,uBACA,mBACA,+BACA,eAEA,CACA,QACA,0CACA,CACA,cElLO,gCAKI,yBACX,kBAAgC,EAChC,oDACQ,EAAW,GAUnB,MAVmB,OAUnB,mBACA,WACA,UAA4B,EAAO,GACnC,EADmC,MACd,EAAyB,cAC9C,SAD8C,EAC9C,aACS,CACT,UACA,YAAyB,gBAAc,eACvC,UACA,IAAqE,CAApD,CAAoD,KAAN,GAAG,CAAG,CACrE,CACA,CACA,8CACA,OACA,qBACA,qBACA,aAEA,uBACA,iBACA,6BACA,6BACA,yCACA,yBACA,yBACA,mBACA,eACA,uBACA,uBACA,mCACA,mBAEA,CACA,cACA,uBAEA,cACA,sBACA,CAKA,WACA,UAAkB,CAClB,CAKA,SACA,KAPkC,CAOlC,IAAkB,CAClB,CACA,UACA,EAHgC,KAGhC,YAEA,CC9EO,QACP,kBACA,+BACA,qBACA,UAEA,CACA,CACA,oBACA,2BACA,CACA,gBACA,uBACA,CACA,2BACA,kCACA,CACA,CCZA,IAAM,EAAS,4BACf,WACA,IACA,IACA,IACA,IACA,IACA,EACA,gBACA,MACA,kDACA,2CACA,yGACA,aACA,cACA,eACA,CAAa,EAEb,SACA,iCACA,mCACA,UAEA,kDACA,CACA,CAKW,yBACX,kBAA+B,EAC/B,WACA,mBAEA,YADA,IAA4B,iBAAe,IAC3C,CACA,WACA,UACA,aACA,UAEA,eACA,8BACA,iBAKA,OAJA,aAAsD,iBAAe,EACrE,kDAAyG,qBAAe,gBAExH,OACA,CACA,CAEA,SACA,OAA+B,EAAc,UAC7C,CACA,CAF6C,CAGpC,CACT,MAAa,EAAS,EACtB,UACA,IAFsB,EAEtB,QAAgC,EAAO,OACvC,QAAyB,EAAyB,GAClD,oBADkD,GAClD,CACa,QACb,CACA,CACA,8CACA,OACA,qBACA,aAEA,eACA,uBACA,yCACA,WACA,2BACA,mBACA,2BACA,eAEA,CACA,cACA,YAAoB,EAAS,QAC7B,CACA,OAF6B,KAE7B,KACA,yBACA,sBACA,CACA,qBACA,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BACA,CACA,CAMA,sBACA,uBACA,QACA,CACA,YACA,sBACA,mBACA,iBACA,EACA,EACA,CACU,iBACV,UAEA,iBAEA,CACA,UACA,uBAEA,OACA,6BACA,yBACA,IACA,CACA,OACA,+BACA,CACA,SACA,iBACA,CACA,aACA,8BACA,kBAEA,CACA,WACA,wCACA,sBAGA,aACA,OACA,EACA,EACA,CAEA,CACA,QACA,wCACA,qBACA,QACA,CACA,CACA,UACA,wCAGA,iBACA,QACA,CACA,CACA,oBACA,qBACA,CACA,CCzKA,qIACA,aACA,cACA,eACA,CAAC,CACD,SACA,UACA,OACA,CACA,WAGA,CACA,MACA,OACA,CACA,OACA,OACA,CACA,YACA,OACA,CACA,eACA,QACA,CACA,CACA,mEACO,SAAS,YAChB,EACA,MAEA,KACA,CC/BO,OAAiC,IEK7B,MHqB4B,CGrB5B,iBACX,cACA,CFP+D,IEO/D,oJACA,CACA,kBACA,YACA,CACA,CACO,MAAM,GACb,eACA,oBACA,WACA,UACA,YACA,aACA,UACA,2BAEA,OAA+B,EAAc,UAC7C,CACA,CAF6C,CAGpC,CACT,CACA,CACA,yCA4BO,UACP,iBACA,UAAoC,iBAAe,cACnD,wBACA,SAEA,SACA,UACA,OAEA,MAA8B,GAAgB,WAM9C,GALA,GACA,IAF8C,iBAE9C,KAGA,EADA,WACA,yBACA,GACA,SACA,gBACA,UAA4C,iBAAe,cAC3D,SACA,oBACA,CACA,IACA,CACA,EACA,eACA,WACA,UAEA,QACA,QAGA,cACA,sBACA,4CACA,IAEA,OADA,eACA,CACA,EAA8B,OAC9B,GACA,CACA,CACA,WACA,sBACA,4CACA,IAEA,OADA,YACA,CACA,EAA8B,OAC9B,GACA,CACA,CACA,SACA,OAA+B,EAAc,UAC7C,CACA,CAF6C,CAGpC,EACT,QACA,CACA,CAiCA,iBACA,GATA,WASA,EATA,MAWA,YAEA,CCvJA,mBAaA,OAZA,2CACA,uBACA,yBACA,2CACA,6BACA,6EACA,iDACA,yCACA,uCACA,2DACA,mDACA,mCACA,CACA,CAAC,OAAqB,EACtB,eAGA,OAFA,yEACA,iDACA,CACA,CAAC,OAAyB,EAC1B,eAKA,OAJA,mDACA,mCACA,+DACA,2CACA,CACA,CAAC,OAAqB,EACtB,eAgCA,OA/BA,2CACA,yCACA,2DACA,iEACA,+DACA,6DACA,iEACA,6DACA,iEACA,qDACA,6CACA,iCACA,iCACA,yCACA,iDACA,2CACA,uDACA,yDACA,mDACA,yEACA,uDACA,6CACA,2CACA,uDACA,uCACA,+CAEA,gBACA,0BACA,4BACA,gCACA,CACA,CAAC,OAAyB,EAC1B,eAEA,OADA,wCACA,CACA,CAAC,OAAsB,EACvB,eAMA,OALA,iDACA,yCACA,yCACA,yCACA,6CACA,CACA,CAAC,OAAiB,EAClB,eAKA,OAJA,4CACA,4DACA,0CACA,0BACA,CACA,CAAC,OAAoB,EACrB,eAEA,OADA,qCACA,CACA,CAAC,OAAiB,EACd,GAAQ,YAEZ,GAFY,IACZ,+BACA,CACA,CAAC,CAAC,IAAQ,EAAM,EAChB,UADU,EACV,GAEA,OADA,gDACA,CACA,CAAC,OAAgC,EACjC,eAGA,OAFA,sDACA,sDACA,CACA,CAAC,OAA0B,EAC3B,eAEA,OADA,+BACA,CACA,CAAC,OAAqB,EAEf,gBACP,qBACA,2BACA,4BACA,wBACA,kBACA,0BACA,wBACA,kBACA,mCACA,mCACA,mCACA,qCACA,oCACA,uCACA,+BACA,wCACA,EAGO,YACP,oCACA,qCACA,wCACA,EC9HO,SAASE,GACdC,CAAuB,EAEvB,OACEA,UACmB,UAAnB,OAAOA,GACP,SAAUA,GACc,YAAxB,OAAOA,EAAQC,IAAI,CCXvB,gDAkBA,CAAQ,kFARR,EAAU,EAAQ,GAAoB,CAS/B,aATU,KASV,MACP,iBACA,mCACA,CACA,CAKA,eACA,UALO,SACP,8BACA,gBACA,EAEA,aACA,kCAEA,IACA,qBACA,qCAEA,aACA,cACA,iCACS,GAET,OACA,EACA,WACA,yCACA,KAEA,IACA,WACA,QACA,MACA,OACA,CAAS,CACT,CACA,CACA,UAKA,oBACA,sCACA,CACA,aACA,SACA,CACA,0BACA,kBACA,KAEA,OADA,kBACA,CACA,CACA,qBACA,8CACA,CACA,6BACA,kBACA,wBAEA,WAEA,wBACA,mBACA,CACA,YACA,MACA,aAEA,IAAgB,aAAc,sBAC9B,KACA,UACA,EAAU,CACV,KACA,SACA,KAEA,EACA,gBACA,IAAa,GAAwB,wDACrC,WAGA,oFACA,KACA,EAGU,oDACV,QAHA,oCACA,MAIA,MAhEA,KAsEA,OALA,cACA,mBACA,mBACA,iBAEA,kFACA,CACA,QAA4D,GAAgB,QAC5E,KAD4E,cAC5E,yEAEA,SACA,QACA,IACA,KACA,aACA,GACA,uBAA+C,GAA6B,QAAQ,kEAAoF,GACxK,QACA,qBACA,CAAyB,EAEzB,EAIA,GAHA,GACA,gDAAuG,IAEvG,WACA,IACA,sBACA,CAAsB,SAEtB,MADA,QACA,CACA,EAAsB,OACtB,GACA,CAEA,IACA,WACA,GAAwB,GAAU,GAElC,IAFkC,GAElC,WACA,QAGA,IACyB,UAEzB,MADA,QACA,CACA,CAAyB,aAKzB,OAHA,QACA,IAEA,CACA,CAAkB,SAGlB,MAFA,QACA,IACA,CACA,CACA,CAAa,EACb,CACA,WACA,WACA,wBACA,KACA,EAAc,CACd,KACA,QACA,GAAqC,4CAGrC,WACA,OACA,6CACA,4BAEA,yBACA,eACA,wBAUA,+CAVA,EACA,yCACA,2BACA,yBAEA,OADA,cACA,uBACA,EACA,yBAEA,CAGA,CAHc,CAlBd,CAsBA,CACA,gBACA,WACA,gFACA,gDACA,CACA,kBAEA,OADA,kCAEA,CACA,wBACA,+BACA,gBACA,CACA,0BACA,+BACA,WACA,IACA,UAEA,CACA,CACA,IAAM,GAAS,MACf,OADe,GACf,GACA,YACA,CAAC,GC7KM,wBAGA,OAFA,uBAGA,UC1DA,UACP,qBACA,MAGA,SDuCO,cACP,MAAoB,EAAc,GCxC4C,CDwC5C,YAIlC,OACA,qBAJA,MAAsC,2BAA2B,CACjE,gBAIA,wBAHA,MlC1CO,sCkC8CP,CACA,EChD8E,CD2CY,CC3CZ,wBAC9E,iBAAwD,GAA4B,iBACpF,kDAEA,mDACA,sBACA,CACA,gBACA,uBAEA,SACA,wBACA,iIACA,YACA,cACA,eACA,CAAa,EAEb,0BACA,KAAkB,GAClB,0BACA,YACA,SAA4D,CAAtC,KAAsC,CAC5D,EADwE,CAAK,KACzD,EACpB,QACA,CAAS,CAF+B,CAGxC,kBACA,CACA,UAIA,0BACA,KAAkB,GAClB,SACA,YACA,IAH8C,KAGc,CAAtC,KAAsC,CAC5D,EADwE,CAAK,KACzD,EACpB,SACA,CAFwC,OAExC,WACA,CAAS,EACT,kBACA,CACA,CC5BA,iBACA,iGACA,2CACA,cACA,aAA6B,EAAkB,GAC/C,aAD+C,SAC/C,GAIA,aAFA,IAAoC,iBAAe,IAEnD,SACA,QAEA,CACA,CCjCO,OAAqC,6BCDrC,OAAMC,ODCsD,ICD/BC,MAClCC,YAAYC,CAAe,CAAEnD,CAAsB,CAAE,CAD5BgD,KAElB,CACF,eAAaG,CAAAA,CAAQ5C,QAAQ,CAAC,KAAO4C,EAAUA,EAAU,KAAE,6BAC5DnD,GAEF,IAAI,CAACoD,IAAI,CAAG,gBACd,CACF,CELA,SACA,mBACA,eACA,eACA,WACA,YACA,WACA,CACA,CAIA,SACA,cACA,eACA,cACA,CACA,CAkBW,SACX,mBACA,mBACA,iBACA,eACA,qBACA,eAGA,iBACA,iBACA,yBACA,wBACA,CAKA,aACA,iBACA,sBAEA,sBACA,gBACA,CAKA,cAEA,mBACA,mBAKA,cACA,mBACA,iBACA,CAKA,aACA,qBAGA,OADA,mBACA,CACA,CASA,SACA,2EACA,QACA,sEAAsF,EAAK,yHAC3F,aACA,cACA,eACA,CAAa,EAEb,kBAEA,OADA,iDACA,GAEA,wBACA,KAEA,SACA,uCACA,SACA,uBACU,CAEV,oBACA,oBACA,kBACA,iBACA,CAEA,sDACA,wBACA,yBACA,uBACA,wDACA,CACA,QACA,CAMA,OACA,wBACA,CAMA,OACA,wBACA,KAGA,OADA,mBACA,OAKA,qBACA,qBACA,wBAEA,OACA,OACA,MACA,OACA,CACA,SAEA,CAUA,UACA,wBACA,IACA,mBACA,qBACA,uBACA,CAGA,WACA,sBACA,CAIA,kBACA,sBAEA,eE9JoB,IAAIC,GACtB,KAD8BA,KAE9B,EADY,CACDC,EAAMC,IAAI,EAITC,QAAQC,GAAG,CAACC,wBAAwB,EAC9CC,QAAQC,KAAK,CAACC,IAAI,CAACF,QAAS,wBC3CrB,ED4CPtF,MC5CO,0CACX,0BAA8B,EAAQ,QACtC,EAAE,OACF,4BACA,8CACA,0CAKA,cAuEW,cACX,UAGA,uBACA,CCtF4F,uBAC5F,MACA,WAIA,YACA,IACA,gBACA,EAAM,OAEN,eAiBA,KACA,wCACA,qCACA,OACA,qEACA,wHACA,sEACA,CACA,EAzBA,QACA,cACA,CACA,CACA,eACA,OACA,oDACA,yBACA,IACA,oBACA,wBACS,CACT,sDACA,0BACA,IAEA,CAUA,uBACA,gBACA,OAEA,SACA,GACA,2BAEA,MDyBW,WACX,KC1BqC,CD0BrC,IAGA,sBACA,IC7BA,KACA,eACA,0BAGA,qBACA,CACO,uBACP,8EACA,kEACA,4EACA,oBACA,4BACA,oBACA,EACA,CACA,CC/DA,IAAM,GAAwC,+HAC9C,aACA,cACA,eACA,CAAC,CACD,OAAM,GACN,UACA,MAAc,EACd,CACA,WAGA,CACA,MACA,CAT2B,KASb,EACd,CACA,OACA,MAAc,EACd,CACA,YACA,EAbsD,IAaxC,EACd,CACA,eACA,KATsD,EAStD,CACA,CACA,CACA,IAAM,GAA4B,IAToB,SASpB,YANoB,OAMpB,6BCzB3B,GD2BC,GACR,IAAmB,GAEnB,IAAe,EGvBR,UACP,GFR6C,SEQ7C,UHmBoC,CGnBlB,MHoB6B,IGpB7B,gBAAiC,EACnD,MFToE,aESpE,SACA,iBACA,eACA,mBACA,sBAAiC,OACjC,0BACA,CACA,SACA,GAAY,GAAU,GACtB,IADsB,CACtB,WACA,KAEA,mEACU,wBAEV,yBAEA,8GACA,YACA,cACA,eACA,CAAa,CAEb,CACA,mBHD4B,CGG5B,iBACA,KAEA,MAA8B,GAAoB,UAClD,IACA,WAFkD,QAElD,QAEA,MAA+B,GAAqB,WAKpD,eALoD,SAKpD,CACA,uBAGA,kCACA,2DACA,iDAOA,OH5B4B,EG4BgB,UAC5C,IACA,MAAsB,GAAqB,KAC3C,iBAH4C,EAG5C,CACA,CAF2C,CAE1B,QACjB,CAAc,SACd,kCACA,CACA,CAAS,CHnCD,GACO,GAA4B,QAEhC,GAAqB,SGiChC,sBHpCoC,CGoCpC,EHnC2C,CGqC3C,GHnCgC,GGmChC,sBAEA,OADA,sCACA,mBACA,CACA,qBACA,sCACA,iCACA,gBAEA,MAA0B,GAAgB,WAC1C,MACA,IAF0C,EAE1C,0BAA4C,GAAc,uEAC1D,aACA,cACA,eACA,CAAa,EAEb,OAAe,GAAsB,OACrC,YADqC,MACrC,SACA,6BAEA,CACA,qBAIA,GADA,gIACA,iBAEA,IACA,qDACA,CAAc,SACd,wCAAwD,GAAc,2EACtE,OACA,CAAiB,uBACjB,aACA,cACA,eACA,CAAiB,EACjB,CAEA,CACA,CACA,cACA,8JACA,YACA,cACA,eACA,CAAK,CACL,CCpHW,eAEX,IADA,EACA,GACA,aACA,GACA,QAEA,WACA,SACA,CAAa,aAIb,CAAa,EACb,YAEA,EACA,QACA,CEMO,SACP,WACA,iBACA,uGACA,aACA,cACA,eACA,CAAa,EAEb,wCACA,gBACA,CACA,gBACA,iBACA,wGACA,aACA,cACA,eACA,CAAa,CAEb,mBACA,8CAEA,gBACA,CACA,cACA,4BACA,iBACA,gBACA,CACA,CCtDW,cACX,OACA,qDACA,sEACA,2EACA,CACA,CCJA,2CCiCO,yBACP,SACA,cAGA,YAzCA,KACA,OACA,UACA,CAGA,sBACA,mBACA,YAAuB,aAA8B,KACrD,6BACA,IAEA,2CACA,MAAqC,E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ACA,UACA,WACA,SACA,OACA,WACA,SACA,cACA,WACA,CAAI,mBACJ,gBACA,iCACA,EACA,EAeA,MAYA,EAKA,EAfA,EAfA,CACA,OACA,4BACA,SACA,OAAoB,oBAA4B,CAChD,OAAqB,YAAgB,CACrC,wBAAuC,iBAAwB,CAC/D,OACA,OAAqB,SAmBrB,WADA,GADA,EAjBqB,GAkBrB,eACA,QAnBqB,CAAmC,CACxD,OAAmB,UAAc,CACjC,OAAqB,SAsBrB,WADA,GADA,EApBqB,GAqBrB,eACA,QAtBqB,CAAmC,CACxD,OAAwB,iBAKxB,SACA,eACA,MACA,YAGA,QATA,CACA,CA/FA,SACA,eACA,OAA8B,uBAAkC,EAChE,EAaA,GACA,qBACA,sBACA,kBACA,qBACA,qBACA,CAAC,EACD,UAnBA,aACA,+CACA,kBACA,oBACA,OAA6B,kDAA4F,EAEzH,SACA,EACA,IAAoD,eAAkB,SAAa,EAWnF,GAkFA,8BAKA,0BA0DA,QACA,eAEA,qBACA,gBACA,sBACA,KAEA,eADA,KAEA,yBAAiC,UAAa,CAG9C,CACA,oBACA,sCACA,CAIA,WACA,yBAEA,UACA,2CACA,0BACA,CACA,aACA,MACA,+BACA,aACA,yBAEA,8DACA,6CACA,CACA,OACA,0BACA,CACA,UACA,+CACA,eAMA,OALA,cAAoB,UAAa,EACjC,kBACA,SACA,yCAA4E,IAE5E,KAKA,UACA,mBACA,qDAKA,OAJA,kBACA,SACA,yCAA0E,IAE1E,CACA,CAIA,QAEA,OADA,6CACA,KAKA,8CACA,wBAA6B,iDAAiD,EAE9E,WACA,2CAAoD,OAAO,GAAG,4BAA4B,WAAW,EACrG,CACA,EAGA,QACA,mBAGA,KADA,sBAEA,gBACA,+FAEA,aADA,mBA3IA,YACA,MACA,SACA,IAEA,EACA,EACA,EACA,EACA,EANA,KACA,IAMA,aACA,yCACA,KAEA,kBAMA,kBAGA,IAFA,IACA,KACA,KAEA,SADA,gBACA,CAKA,IAJA,IACA,KACA,IACA,IACA,YAZA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AtrD,EAAsrD,eAAuC,6BAA+B,sBAAsB,EAAE,aAA+B,sBAAnzD,EAAmzD,uBAA+C,6BAA+B,8BAA8B,EAAE,aAA+B,sBAAh8D,EAAg8D,oBAA4C,6BAA+B,2BAA2B,EAAE,aAA+B,sBAAvkE,EAAukE,YAAoC,6BAA+B,mBAAmB,EAAE,aAA+B,sBAA9rE,EAA8rE,kBAA0C,6BAA+B,yBAAyB,EAAE,aAA+B,sBAAj0E,EAAi0E,cAAsC,6BAA+B,qBAAqB,EAAE,YAA8B,sBAA37E,EAA27E,oBAA4C,6BAA+B,2BAA2B,EAAE,aAA+B,sBAAlkF,EAAkkF,sBAA8C,6BAA+B,6BAA6B,EAAE,sBAA9qF,EAA8qF,kBAA0C,6BAA+B,yBAAyB,EAAE,sBAAlxF,EAAkxF,iBAAyC,6BAA+B,wBAAwB,EAAE,aAA+B,sBAAn5F,EAAm5F,kBAA0C,6BAA+B,yBAAyB,EAAE,sBAAv/F,EAAu/F,mBAA2C,6BAA+B,0BAA0B,EAAE,sBAA7lG,EAA6lG,wBAAgD,6BAA+B,+BAA+B,EAAE,YAAgC,sBAA7uG,EAA6uG,WAAmC,6BAA+B,kBAAkB,EAAE,aAAiC,sBAAp2G,EAAo2G,QAAgC,6BAA+B,eAAe,EAAE,aAAiC,sBAAr9G,EAAq9G,WAAmC,6BAA+B,kBAAkB,EAAE,aAAiC,sBAA5kH,EAA4kH,eAAuC,6BAA+B,sBAAsB,EAAE,aAAiC,sBAA3sH,EAA2sH,SAAiC,6BAA+B,gBAAgB,EAAE,WAAc,0FAAyF,GAAI,aAAiB","sources":["webpack://_N_E/./node_modules/next/dist/experimental/testmode/fetch.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/globals.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/error.js","webpack://_N_E/./node_modules/next/dist/esm/lib/constants.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/utils.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js","webpack://_N_E/../../../../src/shared/lib/i18n/detect-domain-locale.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/parse-path.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-path-prefix.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-path-suffix.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/path-has-prefix.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-locale.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts","webpack://_N_E/../../../src/shared/lib/get-hostname.ts","webpack://_N_E/../../../../src/shared/lib/i18n/normalize-locale-path.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/remove-path-prefix.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts","webpack://_N_E/./node_modules/next/dist/esm/server/web/next-url.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/cookies.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/request.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/response.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/relativize-url.ts","webpack://_N_E/../../../src/client/components/app-router-headers.ts","webpack://_N_E/./node_modules/next/dist/esm/server/internal-utils.js","webpack://_N_E/../../../../src/shared/lib/page-path/ensure-leading-slash.ts","webpack://_N_E/../../../src/shared/lib/segment.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/app-paths.ts","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/async-local-storage.js","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/work-async-storage.external.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js","webpack://_N_E/./node_modules/next/dist/esm/server/lib/trace/constants.js","webpack://_N_E/../../../src/shared/lib/is-thenable.ts","webpack://_N_E/./node_modules/next/dist/esm/server/lib/trace/tracer.js","webpack://_N_E/./node_modules/next/dist/esm/server/api-utils/index.js","webpack://_N_E/./node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js","webpack://_N_E/./node_modules/next/dist/esm/server/async-storage/request-store.js","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js","webpack://_N_E/../../../src/shared/lib/invariant-error.ts","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js","webpack://_N_E/./node_modules/next/dist/esm/server/lib/lru-cache.js","webpack://_N_E/../../../../src/server/lib/incremental-cache/tags-manifest.external.ts","webpack://_N_E/../../../../src/server/lib/cache-handlers/default.external.ts","webpack://_N_E/./node_modules/next/dist/esm/server/use-cache/handlers.js","webpack://_N_E/./node_modules/next/dist/esm/server/revalidation-utils.js","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/async-local-storage.js?25e9","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js","webpack://_N_E/./node_modules/next/dist/esm/server/after/after-context.js","webpack://_N_E/./node_modules/next/dist/esm/server/lib/lazy-result.js","webpack://_N_E/./node_modules/next/dist/esm/server/async-storage/work-store.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/web-on-close.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/get-edge-preview-props.js","webpack://_N_E/./node_modules/next/dist/esm/server/after/builtin-request-context.js","webpack://_N_E/./node_modules/next/dist/esm/server/lib/implicit-tags.js","webpack://_N_E/./node_modules/next/dist/esm/server/lib/is-rsc-request.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/adapter.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/user-agent.js","webpack://_N_E/./node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js","webpack://_N_E/./node_modules/next/dist/esm/server/after/after.js","webpack://_N_E/./node_modules/next/dist/esm/server/after/index.js","webpack://_N_E/../../../src/client/components/hooks-server-context.ts","webpack://_N_E/../../../src/client/components/static-generation-bailout.ts","webpack://_N_E/./node_modules/next/dist/esm/server/dynamic-rendering-utils.js","webpack://_N_E/./node_modules/next/dist/esm/lib/framework/boundary-constants.js","webpack://_N_E/../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts","webpack://_N_E/../../../src/server/app-render/dynamic-rendering.ts","webpack://_N_E/../../../src/server/request/utils.ts","webpack://_N_E/../../../src/server/request/connection.ts","webpack://_N_E/../../../../src/shared/lib/utils/reflect-utils.ts","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js","webpack://_N_E/./node_modules/next/dist/esm/server/app-render/action-async-storage.external.js","webpack://_N_E/./node_modules/next/dist/esm/lib/picocolors.js","webpack://_N_E/./node_modules/next/dist/esm/build/output/log.js","webpack://_N_E/../../../src/server/request/root-params.ts","webpack://_N_E/./node_modules/next/dist/esm/server/web/exports/index.js","webpack://_N_E/./node_modules/next/dist/esm/api/server.js","webpack://_N_E/./src/middleware.js","webpack://_N_E/../../../../src/client/components/http-access-fallback/http-access-fallback.ts","webpack://_N_E/../../../src/client/components/redirect-status-code.ts","webpack://_N_E/../../../src/client/components/redirect-error.ts","webpack://_N_E/../../../src/client/components/is-next-router-error.ts","webpack://_N_E/","webpack://_N_E/./node_modules/next/dist/compiled/p-queue/index.js","webpack://_N_E/external commonjs \"node:buffer\"","webpack://_N_E/./node_modules/next/dist/experimental/testmode/context.js","webpack://_N_E/./node_modules/next/dist/compiled/react/cjs/react.react-server.production.js","webpack://_N_E/./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js","webpack://_N_E/./node_modules/next/dist/compiled/ua-parser-js/ua-parser.js","webpack://_N_E/external commonjs \"node:async_hooks\"","webpack://_N_E/./node_modules/next/dist/compiled/cookie/index.js","webpack://_N_E/./node_modules/next/dist/experimental/testmode/server-edge.js","webpack://_N_E/./node_modules/next/dist/compiled/react/react.react-server.js","webpack://_N_E/./node_modules/next/dist/compiled/@opentelemetry/api/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n handleFetch: null,\n interceptFetch: null,\n reader: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n handleFetch: function() {\n return handleFetch;\n },\n interceptFetch: function() {\n return interceptFetch;\n },\n reader: function() {\n return reader;\n }\n});\nconst _context = require(\"./context\");\nconst reader = {\n url (req) {\n return req.url;\n },\n header (req, name) {\n return req.headers.get(name);\n }\n};\nfunction getTestStack() {\n let stack = (new Error().stack ?? '').split('\\n');\n // Skip the first line and find first non-empty line.\n for(let i = 1; i < stack.length; i++){\n if (stack[i].length > 0) {\n stack = stack.slice(i);\n break;\n }\n }\n // Filter out franmework lines.\n stack = stack.filter((f)=>!f.includes('/next/dist/'));\n // At most 5 lines.\n stack = stack.slice(0, 5);\n // Cleanup some internal info and trim.\n stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim());\n return stack.join(' ');\n}\nasync function buildProxyRequest(testData, request) {\n const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request;\n return {\n testData,\n api: 'fetch',\n request: {\n url,\n method,\n headers: [\n ...Array.from(headers),\n [\n 'next-test-stack',\n getTestStack()\n ]\n ],\n body: body ? Buffer.from(await request.arrayBuffer()).toString('base64') : null,\n cache,\n credentials,\n integrity,\n mode,\n redirect,\n referrer,\n referrerPolicy\n }\n };\n}\nfunction buildResponse(proxyResponse) {\n const { status, headers, body } = proxyResponse.response;\n return new Response(body ? Buffer.from(body, 'base64') : null, {\n status,\n headers: new Headers(headers)\n });\n}\nasync function handleFetch(originalFetch, request) {\n const testInfo = (0, _context.getTestReqInfo)(request, reader);\n if (!testInfo) {\n // Passthrough non-test requests.\n return originalFetch(request);\n }\n const { testData, proxyPort } = testInfo;\n const proxyRequest = await buildProxyRequest(testData, request);\n const resp = await originalFetch(`http://localhost:${proxyPort}`, {\n method: 'POST',\n body: JSON.stringify(proxyRequest),\n next: {\n // @ts-ignore\n internal: true\n }\n });\n if (!resp.ok) {\n throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), \"__NEXT_ERROR_CODE\", {\n value: \"E146\",\n enumerable: false,\n configurable: true\n });\n }\n const proxyResponse = await resp.json();\n const { api } = proxyResponse;\n switch(api){\n case 'continue':\n return originalFetch(request);\n case 'abort':\n case 'unhandled':\n throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), \"__NEXT_ERROR_CODE\", {\n value: \"E145\",\n enumerable: false,\n configurable: true\n });\n case 'fetch':\n return buildResponse(proxyResponse);\n default:\n return api;\n }\n}\nfunction interceptFetch(originalFetch) {\n global.fetch = function testFetch(input, init) {\n var _init_next;\n // Passthrough internal requests.\n // @ts-ignore\n if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) {\n return originalFetch(input, init);\n }\n return handleFetch(originalFetch, new Request(input, init));\n };\n return ()=>{\n global.fetch = originalFetch;\n };\n}\n\n//# sourceMappingURL=fetch.js.map","export async function getEdgeInstrumentationModule() {\n const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation;\n return instrumentation;\n}\nlet instrumentationModulePromise = null;\nasync function registerInstrumentation() {\n // Ensure registerInstrumentation is not called in production build\n if (process.env.NEXT_PHASE === 'phase-production-build') return;\n if (!instrumentationModulePromise) {\n instrumentationModulePromise = getEdgeInstrumentationModule();\n }\n const instrumentation = await instrumentationModulePromise;\n if (instrumentation == null ? void 0 : instrumentation.register) {\n try {\n await instrumentation.register();\n } catch (err) {\n err.message = `An error occurred while loading instrumentation hook: ${err.message}`;\n throw err;\n }\n }\n}\nexport async function edgeInstrumentationOnRequestError(...args) {\n const instrumentation = await getEdgeInstrumentationModule();\n try {\n var _instrumentation_onRequestError;\n await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args));\n } catch (err) {\n // Log the soft error and continue, since the original error has already been thrown\n console.error('Error in instrumentation.onRequestError:', err);\n }\n}\nlet registerInstrumentationPromise = null;\nexport function ensureInstrumentationRegistered() {\n if (!registerInstrumentationPromise) {\n registerInstrumentationPromise = registerInstrumentation();\n }\n return registerInstrumentationPromise;\n}\nfunction getUnsupportedModuleErrorMessage(module) {\n // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found\n return `The edge runtime does not support Node.js '${module}' module.\nLearn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;\n}\nfunction __import_unsupported(moduleName) {\n const proxy = new Proxy(function() {}, {\n get (_obj, prop) {\n if (prop === 'then') {\n return {};\n }\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n },\n construct () {\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n },\n apply (_target, _this, args) {\n if (typeof args[0] === 'function') {\n return args[0](proxy);\n }\n throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n });\n return new Proxy({}, {\n get: ()=>proxy\n });\n}\nfunction enhanceGlobals() {\n if (process.env.NEXT_RUNTIME !== 'edge') {\n return;\n }\n // The condition is true when the \"process\" module is provided\n if (process !== global.process) {\n // prefer local process but global.process has correct \"env\"\n process.env = global.process.env;\n global.process = process;\n }\n // to allow building code that import but does not use node.js modules,\n // webpack will expect this function to exist in global scope\n try {\n Object.defineProperty(globalThis, '__import_unsupported', {\n value: __import_unsupported,\n enumerable: false,\n configurable: false\n });\n } catch {}\n // Eagerly fire instrumentation hook to make the startup faster.\n void ensureInstrumentationRegistered();\n}\nenhanceGlobals();\n\n//# sourceMappingURL=globals.js.map","export class PageSignatureError extends Error {\n constructor({ page }){\n super(`The middleware \"${page}\" accepts an async API directly with the form:\n \n export function middleware(request, event) {\n return NextResponse.redirect('/new-location')\n }\n \n Read more: https://nextjs.org/docs/messages/middleware-new-signature\n `);\n }\n}\nexport class RemovedPageError extends Error {\n constructor(){\n super(`The request.page has been deprecated in favour of \\`URLPattern\\`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n `);\n }\n}\nexport class RemovedUAError extends Error {\n constructor(){\n super(`The request.ua has been removed in favour of \\`userAgent\\` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n `);\n }\n}\n\n//# sourceMappingURL=error.js.map","export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain';\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8';\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8';\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP';\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI';\nexport const MATCHED_PATH_HEADER = 'x-matched-path';\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate';\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated';\nexport const RSC_PREFETCH_SUFFIX = '.prefetch.rsc';\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments';\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc';\nexport const RSC_SUFFIX = '.rsc';\nexport const ACTION_SUFFIX = '.action';\nexport const NEXT_DATA_SUFFIX = '.json';\nexport const NEXT_META_SUFFIX = '.meta';\nexport const NEXT_BODY_SUFFIX = '.body';\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';\nexport const NEXT_RESUME_HEADER = 'next-resume';\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128;\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256;\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';\n// in seconds\nexport const CACHE_ONE_YEAR = 31536000;\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe;\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware';\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation';\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages';\nexport const DOT_NEXT_ALIAS = 'private-dot-next';\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir';\nexport const APP_DIR_ALIAS = 'private-next-app-dir';\nexport const RSC_MOD_REF_PROXY_ALIAS = 'next/dist/build/webpack/loaders/next-flight-loader/module-proxy';\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate';\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference';\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper';\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import';\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption';\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper';\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;\nexport const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?';\nexport const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?';\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\\n' + 'Please use `revalidate` instead.';\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;\nexport const ESLINT_DEFAULT_DIRS = [\n 'app',\n 'pages',\n 'components',\n 'lib',\n 'src'\n];\nexport const SERVER_RUNTIME = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs'\n};\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */ const WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */ shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */ reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */ serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */ actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */ apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */ apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */ middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */ instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */ edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */ appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */ pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */ pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */ pagesDirNode: 'pages-dir-node'\n};\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ]\n }\n};\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__'\n};\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES };\n\n//# sourceMappingURL=constants.js.map","import { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants';\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) {\n const headers = new Headers();\n for (let [key, value] of Object.entries(nodeHeaders)){\n const values = Array.isArray(value) ? value : [\n value\n ];\n for (let v of values){\n if (typeof v === 'undefined') continue;\n if (typeof v === 'number') {\n v = v.toString();\n }\n headers.append(key, v);\n }\n }\n return headers;\n}\n/*\n Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n that are within a single set-cookie field-value, such as in the Expires portion.\n This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n React Native's fetch does this for *every* header, including set-cookie.\n \n Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/ export function splitCookiesString(cookiesString) {\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while(pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))){\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== '=' && ch !== ';' && ch !== ',';\n }\n while(pos < cookiesString.length){\n start = pos;\n cookiesSeparatorFound = false;\n while(skipWhitespace()){\n ch = cookiesString.charAt(pos);\n if (ch === ',') {\n // ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while(pos < cookiesString.length && notSpecialChar()){\n pos += 1;\n }\n // currently special character\n if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n // we found cookies separator\n cookiesSeparatorFound = true;\n // pos is inside the next cookie, so back up and return it.\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n // in param ',' or param separator ';',\n // we continue from that comma\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */ export function toNodeOutgoingHttpHeaders(headers) {\n const nodeHeaders = {};\n const cookies = [];\n if (headers) {\n for (const [key, value] of headers.entries()){\n if (key.toLowerCase() === 'set-cookie') {\n // We may have gotten a comma joined string of cookies, or multiple\n // set-cookie headers. We need to merge them into one header array\n // to represent all the cookies.\n cookies.push(...splitCookiesString(value));\n nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies;\n } else {\n nodeHeaders[key] = value;\n }\n }\n }\n return nodeHeaders;\n}\n/**\n * Validate the correctness of a user-provided URL.\n */ export function validateURL(url) {\n try {\n return String(new URL(String(url)));\n } catch (error) {\n throw Object.defineProperty(new Error(`URL is malformed \"${String(url)}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {\n cause: error\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E61\",\n enumerable: false,\n configurable: true\n });\n }\n}\n/**\n * Normalizes `nxtP` and `nxtI` query param values to remove the prefix.\n * This function does not mutate the input key.\n */ export function normalizeNextQueryParam(key) {\n const prefixes = [\n NEXT_QUERY_PARAM_PREFIX,\n NEXT_INTERCEPTION_MARKER_PREFIX\n ];\n for (const prefix of prefixes){\n if (key !== prefix && key.startsWith(prefix)) {\n return key.substring(prefix.length);\n }\n }\n return null;\n}\n\n//# sourceMappingURL=utils.js.map","import { PageSignatureError } from '../error';\nconst responseSymbol = Symbol('response');\nconst passThroughSymbol = Symbol('passThrough');\nconst waitUntilSymbol = Symbol('waitUntil');\nclass FetchEvent {\n constructor(_request, waitUntil){\n this[passThroughSymbol] = false;\n this[waitUntilSymbol] = waitUntil ? {\n kind: 'external',\n function: waitUntil\n } : {\n kind: 'internal',\n promises: []\n };\n }\n // TODO: is this dead code? NextFetchEvent never lets this get called\n respondWith(response) {\n if (!this[responseSymbol]) {\n this[responseSymbol] = Promise.resolve(response);\n }\n }\n // TODO: is this dead code? passThroughSymbol is unused\n passThroughOnException() {\n this[passThroughSymbol] = true;\n }\n waitUntil(promise) {\n if (this[waitUntilSymbol].kind === 'external') {\n // if we received an external waitUntil, we delegate to it\n // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox`\n const waitUntil = this[waitUntilSymbol].function;\n return waitUntil(promise);\n } else {\n // if we didn't receive an external waitUntil, we make it work on our own\n // (and expect the caller to do something with the promises)\n this[waitUntilSymbol].promises.push(promise);\n }\n }\n}\nexport function getWaitUntilPromiseFromEvent(event) {\n return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined;\n}\nexport class NextFetchEvent extends FetchEvent {\n constructor(params){\n var _params_context;\n super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil);\n this.sourcePage = params.page;\n }\n /**\n * @deprecated The `request` is now the first parameter and the API is now async.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */ get request() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n /**\n * @deprecated Using `respondWith` is no longer needed.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */ respondWith() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n}\n\n//# sourceMappingURL=fetch-event.js.map","import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n","import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n","import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n","export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n","import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n","import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n","import { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale';\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info';\nimport { getHostname } from '../../shared/lib/get-hostname';\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info';\nconst REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\\/\\/)(127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)/;\nfunction parseURL(url, base) {\n return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'));\n}\nconst Internal = Symbol('NextURLInternal');\nexport class NextURL {\n constructor(input, baseOrOpts, opts){\n let base;\n let options;\n if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') {\n base = baseOrOpts;\n options = opts || {};\n } else {\n options = opts || baseOrOpts || {};\n }\n this[Internal] = {\n url: parseURL(input, base ?? options.base),\n options: options,\n basePath: ''\n };\n this.analyze();\n }\n analyze() {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1;\n const info = getNextPathnameInfo(this[Internal].url.pathname, {\n nextConfig: this[Internal].options.nextConfig,\n parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n i18nProvider: this[Internal].options.i18nProvider\n });\n const hostname = getHostname(this[Internal].url, this[Internal].options.headers);\n this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname);\n const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale);\n this[Internal].url.pathname = info.pathname;\n this[Internal].defaultLocale = defaultLocale;\n this[Internal].basePath = info.basePath ?? '';\n this[Internal].buildId = info.buildId;\n this[Internal].locale = info.locale ?? defaultLocale;\n this[Internal].trailingSlash = info.trailingSlash;\n }\n formatPathname() {\n return formatNextPathnameInfo({\n basePath: this[Internal].basePath,\n buildId: this[Internal].buildId,\n defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined,\n locale: this[Internal].locale,\n pathname: this[Internal].url.pathname,\n trailingSlash: this[Internal].trailingSlash\n });\n }\n formatSearch() {\n return this[Internal].url.search;\n }\n get buildId() {\n return this[Internal].buildId;\n }\n set buildId(buildId) {\n this[Internal].buildId = buildId;\n }\n get locale() {\n return this[Internal].locale ?? '';\n }\n set locale(locale) {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig;\n if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) {\n throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale \"${locale}\"`), \"__NEXT_ERROR_CODE\", {\n value: \"E597\",\n enumerable: false,\n configurable: true\n });\n }\n this[Internal].locale = locale;\n }\n get defaultLocale() {\n return this[Internal].defaultLocale;\n }\n get domainLocale() {\n return this[Internal].domainLocale;\n }\n get searchParams() {\n return this[Internal].url.searchParams;\n }\n get host() {\n return this[Internal].url.host;\n }\n set host(value) {\n this[Internal].url.host = value;\n }\n get hostname() {\n return this[Internal].url.hostname;\n }\n set hostname(value) {\n this[Internal].url.hostname = value;\n }\n get port() {\n return this[Internal].url.port;\n }\n set port(value) {\n this[Internal].url.port = value;\n }\n get protocol() {\n return this[Internal].url.protocol;\n }\n set protocol(value) {\n this[Internal].url.protocol = value;\n }\n get href() {\n const pathname = this.formatPathname();\n const search = this.formatSearch();\n return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`;\n }\n set href(url) {\n this[Internal].url = parseURL(url);\n this.analyze();\n }\n get origin() {\n return this[Internal].url.origin;\n }\n get pathname() {\n return this[Internal].url.pathname;\n }\n set pathname(value) {\n this[Internal].url.pathname = value;\n }\n get hash() {\n return this[Internal].url.hash;\n }\n set hash(value) {\n this[Internal].url.hash = value;\n }\n get search() {\n return this[Internal].url.search;\n }\n set search(value) {\n this[Internal].url.search = value;\n }\n get password() {\n return this[Internal].url.password;\n }\n set password(value) {\n this[Internal].url.password = value;\n }\n get username() {\n return this[Internal].url.username;\n }\n set username(value) {\n this[Internal].url.username = value;\n }\n get basePath() {\n return this[Internal].basePath;\n }\n set basePath(value) {\n this[Internal].basePath = value.startsWith('/') ? value : `/${value}`;\n }\n toString() {\n return this.href;\n }\n toJSON() {\n return this.href;\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n href: this.href,\n origin: this.origin,\n protocol: this.protocol,\n username: this.username,\n password: this.password,\n host: this.host,\n hostname: this.hostname,\n port: this.port,\n pathname: this.pathname,\n search: this.search,\n searchParams: this.searchParams,\n hash: this.hash\n };\n }\n clone() {\n return new NextURL(String(this), this[Internal].options);\n }\n}\n\n//# sourceMappingURL=next-url.js.map","export { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies';\n\n//# sourceMappingURL=cookies.js.map","import { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { RemovedUAError, RemovedPageError } from '../error';\nimport { RequestCookies } from './cookies';\nexport const INTERNALS = Symbol('internal request');\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */ export class NextRequest extends Request {\n constructor(input, init = {}){\n const url = typeof input !== 'string' && 'url' in input ? input.url : String(input);\n validateURL(url);\n // node Request instance requires duplex option when a body\n // is present or it errors, we don't handle this for\n // Request being passed in since it would have already\n // errored if this wasn't configured\n if (process.env.NEXT_RUNTIME !== 'edge') {\n if (init.body && init.duplex !== 'half') {\n init.duplex = 'half';\n }\n }\n if (input instanceof Request) super(input, init);\n else super(url, init);\n const nextUrl = new NextURL(url, {\n headers: toNodeOutgoingHttpHeaders(this.headers),\n nextConfig: init.nextConfig\n });\n this[INTERNALS] = {\n cookies: new RequestCookies(this.headers),\n nextUrl,\n url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString()\n };\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n nextUrl: this.nextUrl,\n url: this.url,\n // rest of props come from Request\n bodyUsed: this.bodyUsed,\n cache: this.cache,\n credentials: this.credentials,\n destination: this.destination,\n headers: Object.fromEntries(this.headers),\n integrity: this.integrity,\n keepalive: this.keepalive,\n method: this.method,\n mode: this.mode,\n redirect: this.redirect,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n signal: this.signal\n };\n }\n get cookies() {\n return this[INTERNALS].cookies;\n }\n get nextUrl() {\n return this[INTERNALS].nextUrl;\n }\n /**\n * @deprecated\n * `page` has been deprecated in favour of `URLPattern`.\n * Read more: https://nextjs.org/docs/messages/middleware-request-page\n */ get page() {\n throw new RemovedPageError();\n }\n /**\n * @deprecated\n * `ua` has been removed in favour of \\`userAgent\\` function.\n * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n */ get ua() {\n throw new RemovedUAError();\n }\n get url() {\n return this[INTERNALS].url;\n }\n}\n\n//# sourceMappingURL=request.js.map","export class ReflectAdapter {\n static get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n if (typeof value === 'function') {\n return value.bind(target);\n }\n return value;\n }\n static set(target, prop, value, receiver) {\n return Reflect.set(target, prop, value, receiver);\n }\n static has(target, prop) {\n return Reflect.has(target, prop);\n }\n static deleteProperty(target, prop) {\n return Reflect.deleteProperty(target, prop);\n }\n}\n\n//# sourceMappingURL=reflect.js.map","import { stringifyCookie } from '../../web/spec-extension/cookies';\nimport { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { ReflectAdapter } from './adapters/reflect';\nimport { ResponseCookies } from './cookies';\nconst INTERNALS = Symbol('internal response');\nconst REDIRECTS = new Set([\n 301,\n 302,\n 303,\n 307,\n 308\n]);\nfunction handleMiddlewareField(init, headers) {\n var _init_request;\n if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) {\n if (!(init.request.headers instanceof Headers)) {\n throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), \"__NEXT_ERROR_CODE\", {\n value: \"E119\",\n enumerable: false,\n configurable: true\n });\n }\n const keys = [];\n for (const [key, value] of init.request.headers){\n headers.set('x-middleware-request-' + key, value);\n keys.push(key);\n }\n headers.set('x-middleware-override-headers', keys.join(','));\n }\n}\n/**\n * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response)\n */ export class NextResponse extends Response {\n constructor(body, init = {}){\n super(body, init);\n const headers = this.headers;\n const cookies = new ResponseCookies(headers);\n const cookiesProxy = new Proxy(cookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'delete':\n case 'set':\n {\n return (...args)=>{\n const result = Reflect.apply(target[prop], target, args);\n const newHeaders = new Headers(headers);\n if (result instanceof ResponseCookies) {\n headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>stringifyCookie(cookie)).join(','));\n }\n handleMiddlewareField(init, newHeaders);\n return result;\n };\n }\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n this[INTERNALS] = {\n cookies: cookiesProxy,\n url: init.url ? new NextURL(init.url, {\n headers: toNodeOutgoingHttpHeaders(headers),\n nextConfig: init.nextConfig\n }) : undefined\n };\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n url: this.url,\n // rest of props come from Response\n body: this.body,\n bodyUsed: this.bodyUsed,\n headers: Object.fromEntries(this.headers),\n ok: this.ok,\n redirected: this.redirected,\n status: this.status,\n statusText: this.statusText,\n type: this.type\n };\n }\n get cookies() {\n return this[INTERNALS].cookies;\n }\n static json(body, init) {\n const response = Response.json(body, init);\n return new NextResponse(response.body, response);\n }\n static redirect(url, init) {\n const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307;\n if (!REDIRECTS.has(status)) {\n throw Object.defineProperty(new RangeError('Failed to execute \"redirect\" on \"response\": Invalid status code'), \"__NEXT_ERROR_CODE\", {\n value: \"E529\",\n enumerable: false,\n configurable: true\n });\n }\n const initObj = typeof init === 'object' ? init : {};\n const headers = new Headers(initObj == null ? void 0 : initObj.headers);\n headers.set('Location', validateURL(url));\n return new NextResponse(null, {\n ...initObj,\n headers,\n status\n });\n }\n static rewrite(destination, init) {\n const headers = new Headers(init == null ? void 0 : init.headers);\n headers.set('x-middleware-rewrite', validateURL(destination));\n handleMiddlewareField(init, headers);\n return new NextResponse(null, {\n ...init,\n headers\n });\n }\n static next(init) {\n const headers = new Headers(init == null ? void 0 : init.headers);\n headers.set('x-middleware-next', '1');\n handleMiddlewareField(init, headers);\n return new NextResponse(null, {\n ...init,\n headers\n });\n }\n}\n\n//# sourceMappingURL=response.js.map","/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n","export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\n","import { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers';\nconst INTERNAL_QUERY_NAMES = [\n NEXT_RSC_UNION_QUERY\n];\nexport function stripInternalQueries(query) {\n for (const name of INTERNAL_QUERY_NAMES){\n delete query[name];\n }\n}\nexport function stripInternalSearchParams(url) {\n const isStringUrl = typeof url === 'string';\n const instance = isStringUrl ? new URL(url) : url;\n instance.searchParams.delete(NEXT_RSC_UNION_QUERY);\n return isStringUrl ? instance.toString() : instance;\n}\n\n//# sourceMappingURL=internal-utils.js.map","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n","import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n","import { ReflectAdapter } from './reflect';\n/**\n * @internal\n */ export class ReadonlyHeadersError extends Error {\n constructor(){\n super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers');\n }\n static callable() {\n throw new ReadonlyHeadersError();\n }\n}\nexport class HeadersAdapter extends Headers {\n constructor(headers){\n // We've already overridden the methods that would be called, so we're just\n // calling the super constructor to ensure that the instanceof check works.\n super();\n this.headers = new Proxy(headers, {\n get (target, prop, receiver) {\n // Because this is just an object, we expect that all \"get\" operations\n // are for properties. If it's a \"get\" for a symbol, we'll just return\n // the symbol.\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(target, prop, receiver);\n }\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return;\n // If the original casing exists, return the value.\n return ReflectAdapter.get(target, original, receiver);\n },\n set (target, prop, value, receiver) {\n if (typeof prop === 'symbol') {\n return ReflectAdapter.set(target, prop, value, receiver);\n }\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, use the prop as the key.\n return ReflectAdapter.set(target, original ?? prop, value, receiver);\n },\n has (target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop);\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false;\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original);\n },\n deleteProperty (target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop);\n const lowercased = prop.toLowerCase();\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true;\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original);\n }\n });\n }\n /**\n * Seals a Headers instance to prevent modification by throwing an error when\n * any mutating method is called.\n */ static seal(headers) {\n return new Proxy(headers, {\n get (target, prop, receiver) {\n switch(prop){\n case 'append':\n case 'delete':\n case 'set':\n return ReadonlyHeadersError.callable;\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n }\n /**\n * Merges a header value into a string. This stores multiple values as an\n * array, so we need to merge them into a string.\n *\n * @param value a header value\n * @returns a merged header value (a string)\n */ merge(value) {\n if (Array.isArray(value)) return value.join(', ');\n return value;\n }\n /**\n * Creates a Headers instance from a plain object or a Headers instance.\n *\n * @param headers a plain object or a Headers instance\n * @returns a headers instance\n */ static from(headers) {\n if (headers instanceof Headers) return headers;\n return new HeadersAdapter(headers);\n }\n append(name, value) {\n const existing = this.headers[name];\n if (typeof existing === 'string') {\n this.headers[name] = [\n existing,\n value\n ];\n } else if (Array.isArray(existing)) {\n existing.push(value);\n } else {\n this.headers[name] = value;\n }\n }\n delete(name) {\n delete this.headers[name];\n }\n get(name) {\n const value = this.headers[name];\n if (typeof value !== 'undefined') return this.merge(value);\n return null;\n }\n has(name) {\n return typeof this.headers[name] !== 'undefined';\n }\n set(name, value) {\n this.headers[name] = value;\n }\n forEach(callbackfn, thisArg) {\n for (const [name, value] of this.entries()){\n callbackfn.call(thisArg, value, name, this);\n }\n }\n *entries() {\n for (const key of Object.keys(this.headers)){\n const name = key.toLowerCase();\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(name);\n yield [\n name,\n value\n ];\n }\n }\n *keys() {\n for (const key of Object.keys(this.headers)){\n const name = key.toLowerCase();\n yield name;\n }\n }\n *values() {\n for (const key of Object.keys(this.headers)){\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(key);\n yield value;\n }\n }\n [Symbol.iterator]() {\n return this.entries();\n }\n}\n\n//# sourceMappingURL=headers.js.map","const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), \"__NEXT_ERROR_CODE\", {\n value: \"E504\",\n enumerable: false,\n configurable: true\n});\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n static bind(fn) {\n return fn;\n }\n}\nconst maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;\nexport function createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nexport function bindSnapshot(fn) {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn);\n }\n return FakeAsyncLocalStorage.bind(fn);\n}\nexport function createSnapshot() {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot();\n }\n return function(fn, ...args) {\n return fn(...args);\n };\n}\n\n//# sourceMappingURL=async-local-storage.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const workAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=work-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { workAsyncStorageInstance } from './work-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { workAsyncStorageInstance as workAsyncStorage };\n\n//# sourceMappingURL=work-async-storage.external.js.map","import { RequestCookies } from '../cookies';\nimport { ResponseCookies } from '../cookies';\nimport { ReflectAdapter } from './reflect';\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external';\n/**\n * @internal\n */ export class ReadonlyRequestCookiesError extends Error {\n constructor(){\n super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options');\n }\n static callable() {\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport class RequestCookiesAdapter {\n static seal(cookies) {\n return new Proxy(cookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'clear':\n case 'delete':\n case 'set':\n return ReadonlyRequestCookiesError.callable;\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n }\n}\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies');\nexport function getModifiedCookieValues(cookies) {\n const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES];\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return [];\n }\n return modified;\n}\nexport function appendMutableCookies(headers, mutableCookies) {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies);\n if (modifiedCookieValues.length === 0) {\n return false;\n }\n // Return a new response that extends the response with\n // the modified cookies as fallbacks. `res` cookies\n // will still take precedence.\n const resCookies = new ResponseCookies(headers);\n const returnedCookies = resCookies.getAll();\n // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues){\n resCookies.set(cookie);\n }\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies){\n resCookies.set(cookie);\n }\n return true;\n}\nexport class MutableRequestCookiesAdapter {\n static wrap(cookies, onUpdateCookies) {\n const responseCookies = new ResponseCookies(new Headers());\n for (const cookie of cookies.getAll()){\n responseCookies.set(cookie);\n }\n let modifiedValues = [];\n const modifiedCookies = new Set();\n const updateResponseCookies = ()=>{\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore();\n if (workStore) {\n workStore.pathWasRevalidated = true;\n }\n const allCookies = responseCookies.getAll();\n modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name));\n if (onUpdateCookies) {\n const serializedCookies = [];\n for (const cookie of modifiedValues){\n const tempCookies = new ResponseCookies(new Headers());\n tempCookies.set(cookie);\n serializedCookies.push(tempCookies.toString());\n }\n onUpdateCookies(serializedCookies);\n }\n };\n const wrappedCookies = new Proxy(responseCookies, {\n get (target, prop, receiver) {\n switch(prop){\n // A special symbol to get the modified cookie values\n case SYMBOL_MODIFY_COOKIE_VALUES:\n return modifiedValues;\n // TODO: Throw error if trying to set a cookie after the response\n // headers have been set.\n case 'delete':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.delete(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n case 'set':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.set(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n }\n}\nexport function createCookiesWithMutableAccessCheck(requestStore) {\n const wrappedCookies = new Proxy(requestStore.mutableCookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'delete':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().delete');\n target.delete(...args);\n return wrappedCookies;\n };\n case 'set':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().set');\n target.set(...args);\n return wrappedCookies;\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n}\nexport function areCookiesMutableInCurrentPhase(requestStore) {\n return requestStore.phase === 'action';\n}\n/** Ensure that cookies() starts throwing on mutation\n * if we changed phases and can no longer mutate.\n *\n * This can happen when going:\n * 'render' -> 'after'\n * 'action' -> 'render'\n * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) {\n if (!areCookiesMutableInCurrentPhase(requestStore)) {\n // TODO: maybe we can give a more precise error message based on callingExpression?\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport function responseCookiesToRequestCookies(responseCookies) {\n const requestCookies = new RequestCookies(new Headers());\n for (const cookie of responseCookies.getAll()){\n requestCookies.set(cookie);\n }\n return requestCookies;\n}\n\n//# sourceMappingURL=request-cookies.js.map","/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/ // eslint typescript has a bug with TS enums\n/* eslint-disable no-shadow */ var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) {\n BaseServerSpan[\"handleRequest\"] = \"BaseServer.handleRequest\";\n BaseServerSpan[\"run\"] = \"BaseServer.run\";\n BaseServerSpan[\"pipe\"] = \"BaseServer.pipe\";\n BaseServerSpan[\"getStaticHTML\"] = \"BaseServer.getStaticHTML\";\n BaseServerSpan[\"render\"] = \"BaseServer.render\";\n BaseServerSpan[\"renderToResponseWithComponents\"] = \"BaseServer.renderToResponseWithComponents\";\n BaseServerSpan[\"renderToResponse\"] = \"BaseServer.renderToResponse\";\n BaseServerSpan[\"renderToHTML\"] = \"BaseServer.renderToHTML\";\n BaseServerSpan[\"renderError\"] = \"BaseServer.renderError\";\n BaseServerSpan[\"renderErrorToResponse\"] = \"BaseServer.renderErrorToResponse\";\n BaseServerSpan[\"renderErrorToHTML\"] = \"BaseServer.renderErrorToHTML\";\n BaseServerSpan[\"render404\"] = \"BaseServer.render404\";\n return BaseServerSpan;\n}(BaseServerSpan || {});\nvar LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) {\n LoadComponentsSpan[\"loadDefaultErrorComponents\"] = \"LoadComponents.loadDefaultErrorComponents\";\n LoadComponentsSpan[\"loadComponents\"] = \"LoadComponents.loadComponents\";\n return LoadComponentsSpan;\n}(LoadComponentsSpan || {});\nvar NextServerSpan = /*#__PURE__*/ function(NextServerSpan) {\n NextServerSpan[\"getRequestHandler\"] = \"NextServer.getRequestHandler\";\n NextServerSpan[\"getServer\"] = \"NextServer.getServer\";\n NextServerSpan[\"getServerRequestHandler\"] = \"NextServer.getServerRequestHandler\";\n NextServerSpan[\"createServer\"] = \"createServer.createServer\";\n return NextServerSpan;\n}(NextServerSpan || {});\nvar NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) {\n NextNodeServerSpan[\"compression\"] = \"NextNodeServer.compression\";\n NextNodeServerSpan[\"getBuildId\"] = \"NextNodeServer.getBuildId\";\n NextNodeServerSpan[\"createComponentTree\"] = \"NextNodeServer.createComponentTree\";\n NextNodeServerSpan[\"clientComponentLoading\"] = \"NextNodeServer.clientComponentLoading\";\n NextNodeServerSpan[\"getLayoutOrPageModule\"] = \"NextNodeServer.getLayoutOrPageModule\";\n NextNodeServerSpan[\"generateStaticRoutes\"] = \"NextNodeServer.generateStaticRoutes\";\n NextNodeServerSpan[\"generateFsStaticRoutes\"] = \"NextNodeServer.generateFsStaticRoutes\";\n NextNodeServerSpan[\"generatePublicRoutes\"] = \"NextNodeServer.generatePublicRoutes\";\n NextNodeServerSpan[\"generateImageRoutes\"] = \"NextNodeServer.generateImageRoutes.route\";\n NextNodeServerSpan[\"sendRenderResult\"] = \"NextNodeServer.sendRenderResult\";\n NextNodeServerSpan[\"proxyRequest\"] = \"NextNodeServer.proxyRequest\";\n NextNodeServerSpan[\"runApi\"] = \"NextNodeServer.runApi\";\n NextNodeServerSpan[\"render\"] = \"NextNodeServer.render\";\n NextNodeServerSpan[\"renderHTML\"] = \"NextNodeServer.renderHTML\";\n NextNodeServerSpan[\"imageOptimizer\"] = \"NextNodeServer.imageOptimizer\";\n NextNodeServerSpan[\"getPagePath\"] = \"NextNodeServer.getPagePath\";\n NextNodeServerSpan[\"getRoutesManifest\"] = \"NextNodeServer.getRoutesManifest\";\n NextNodeServerSpan[\"findPageComponents\"] = \"NextNodeServer.findPageComponents\";\n NextNodeServerSpan[\"getFontManifest\"] = \"NextNodeServer.getFontManifest\";\n NextNodeServerSpan[\"getServerComponentManifest\"] = \"NextNodeServer.getServerComponentManifest\";\n NextNodeServerSpan[\"getRequestHandler\"] = \"NextNodeServer.getRequestHandler\";\n NextNodeServerSpan[\"renderToHTML\"] = \"NextNodeServer.renderToHTML\";\n NextNodeServerSpan[\"renderError\"] = \"NextNodeServer.renderError\";\n NextNodeServerSpan[\"renderErrorToHTML\"] = \"NextNodeServer.renderErrorToHTML\";\n NextNodeServerSpan[\"render404\"] = \"NextNodeServer.render404\";\n NextNodeServerSpan[\"startResponse\"] = \"NextNodeServer.startResponse\";\n // nested inner span, does not require parent scope name\n NextNodeServerSpan[\"route\"] = \"route\";\n NextNodeServerSpan[\"onProxyReq\"] = \"onProxyReq\";\n NextNodeServerSpan[\"apiResolver\"] = \"apiResolver\";\n NextNodeServerSpan[\"internalFetch\"] = \"internalFetch\";\n return NextNodeServerSpan;\n}(NextNodeServerSpan || {});\nvar StartServerSpan = /*#__PURE__*/ function(StartServerSpan) {\n StartServerSpan[\"startServer\"] = \"startServer.startServer\";\n return StartServerSpan;\n}(StartServerSpan || {});\nvar RenderSpan = /*#__PURE__*/ function(RenderSpan) {\n RenderSpan[\"getServerSideProps\"] = \"Render.getServerSideProps\";\n RenderSpan[\"getStaticProps\"] = \"Render.getStaticProps\";\n RenderSpan[\"renderToString\"] = \"Render.renderToString\";\n RenderSpan[\"renderDocument\"] = \"Render.renderDocument\";\n RenderSpan[\"createBodyResult\"] = \"Render.createBodyResult\";\n return RenderSpan;\n}(RenderSpan || {});\nvar AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) {\n AppRenderSpan[\"renderToString\"] = \"AppRender.renderToString\";\n AppRenderSpan[\"renderToReadableStream\"] = \"AppRender.renderToReadableStream\";\n AppRenderSpan[\"getBodyResult\"] = \"AppRender.getBodyResult\";\n AppRenderSpan[\"fetch\"] = \"AppRender.fetch\";\n return AppRenderSpan;\n}(AppRenderSpan || {});\nvar RouterSpan = /*#__PURE__*/ function(RouterSpan) {\n RouterSpan[\"executeRoute\"] = \"Router.executeRoute\";\n return RouterSpan;\n}(RouterSpan || {});\nvar NodeSpan = /*#__PURE__*/ function(NodeSpan) {\n NodeSpan[\"runHandler\"] = \"Node.runHandler\";\n return NodeSpan;\n}(NodeSpan || {});\nvar AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) {\n AppRouteRouteHandlersSpan[\"runHandler\"] = \"AppRouteRouteHandlers.runHandler\";\n return AppRouteRouteHandlersSpan;\n}(AppRouteRouteHandlersSpan || {});\nvar ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) {\n ResolveMetadataSpan[\"generateMetadata\"] = \"ResolveMetadata.generateMetadata\";\n ResolveMetadataSpan[\"generateViewport\"] = \"ResolveMetadata.generateViewport\";\n return ResolveMetadataSpan;\n}(ResolveMetadataSpan || {});\nvar MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) {\n MiddlewareSpan[\"execute\"] = \"Middleware.execute\";\n return MiddlewareSpan;\n}(MiddlewareSpan || {});\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n \"Middleware.execute\",\n \"BaseServer.handleRequest\",\n \"Render.getServerSideProps\",\n \"Render.getStaticProps\",\n \"AppRender.fetch\",\n \"AppRender.getBodyResult\",\n \"Render.renderDocument\",\n \"Node.runHandler\",\n \"AppRouteRouteHandlers.runHandler\",\n \"ResolveMetadata.generateMetadata\",\n \"ResolveMetadata.generateViewport\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.getLayoutOrPageModule\",\n \"NextNodeServer.startResponse\",\n \"NextNodeServer.clientComponentLoading\"\n]);\n// These Spans are allowed to be always logged\n// when the otel log prefix env is set\nexport const LogSpanAllowList = new Set([\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.clientComponentLoading\"\n]);\nexport { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, };\n\n//# sourceMappingURL=constants.js.map","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable(\n promise: Promise | T\n): promise is Promise {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants';\nimport { isThenable } from '../../../shared/lib/is-thenable';\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX;\nlet api;\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api');\n} else {\n try {\n api = require('@opentelemetry/api');\n } catch (err) {\n api = require('next/dist/compiled/@opentelemetry/api');\n }\n}\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api;\nexport class BubbledError extends Error {\n constructor(bubble, result){\n super(), this.bubble = bubble, this.result = result;\n }\n}\nexport function isBubbledError(error) {\n if (typeof error !== 'object' || error === null) return false;\n return error instanceof BubbledError;\n}\nconst closeSpanWithError = (span, error)=>{\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true);\n } else {\n if (error) {\n span.recordException(error);\n span.setAttribute('error.type', error.name);\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error == null ? void 0 : error.message\n });\n }\n span.end();\n};\n/** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map();\nconst rootSpanIdKey = api.createContextKey('next.rootSpanId');\nlet lastSpanId = 0;\nconst getSpanId = ()=>lastSpanId++;\nconst clientTraceDataSetter = {\n set (carrier, key, value) {\n carrier.push({\n key,\n value\n });\n }\n};\nclass NextTracerImpl {\n /**\n * Returns an instance to the trace with configured name.\n * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization,\n * This should be lazily evaluated.\n */ getTracerInstance() {\n return trace.getTracer('next.js', '0.0.1');\n }\n getContext() {\n return context;\n }\n getTracePropagationData() {\n const activeContext = context.active();\n const entries = [];\n propagation.inject(activeContext, entries, clientTraceDataSetter);\n return entries;\n }\n getActiveScopeSpan() {\n return trace.getSpan(context == null ? void 0 : context.active());\n }\n withPropagatedContext(carrier, fn, getter) {\n const activeContext = context.active();\n if (trace.getSpanContext(activeContext)) {\n // Active span is already set, too late to propagate.\n return fn();\n }\n const remoteContext = propagation.extract(activeContext, carrier, getter);\n return context.with(remoteContext, fn);\n }\n trace(...args) {\n var _trace_getSpanContext;\n const [type, fnOrOptions, fnOrEmpty] = args;\n // coerce options form overload\n const { fn, options } = typeof fnOrOptions === 'function' ? {\n fn: fnOrOptions,\n options: {}\n } : {\n fn: fnOrEmpty,\n options: {\n ...fnOrOptions\n }\n };\n const spanName = options.spanName ?? type;\n if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) {\n return fn();\n }\n // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it.\n let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n let isRootSpan = false;\n if (!spanContext) {\n spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT;\n isRootSpan = true;\n } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) {\n isRootSpan = true;\n }\n const spanId = getSpanId();\n options.attributes = {\n 'next.span_name': spanName,\n 'next.span_type': type,\n ...options.attributes\n };\n return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{\n let startTime;\n if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) {\n startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined;\n }\n let cleanedUp = false;\n const onCleanup = ()=>{\n if (cleanedUp) return;\n cleanedUp = true;\n rootSpanAttributesStore.delete(spanId);\n if (startTime) {\n performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, {\n start: startTime,\n end: performance.now()\n });\n }\n };\n if (isRootSpan) {\n rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {})));\n }\n if (fn.length > 1) {\n try {\n return fn(span, (err)=>closeSpanWithError(span, err));\n } catch (err) {\n closeSpanWithError(span, err);\n throw err;\n } finally{\n onCleanup();\n }\n }\n try {\n const result = fn(span);\n if (isThenable(result)) {\n // If there's error make sure it throws\n return result.then((res)=>{\n span.end();\n // Need to pass down the promise result,\n // it could be react stream response with error { error, stream }\n return res;\n }).catch((err)=>{\n closeSpanWithError(span, err);\n throw err;\n }).finally(onCleanup);\n } else {\n span.end();\n onCleanup();\n }\n return result;\n } catch (err) {\n closeSpanWithError(span, err);\n onCleanup();\n throw err;\n }\n }));\n }\n wrap(...args) {\n const tracer = this;\n const [name, options, fn] = args.length === 3 ? args : [\n args[0],\n {},\n args[1]\n ];\n if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') {\n return fn;\n }\n return function() {\n let optionsObj = options;\n if (typeof optionsObj === 'function' && typeof fn === 'function') {\n optionsObj = optionsObj.apply(this, arguments);\n }\n const lastArgId = arguments.length - 1;\n const cb = arguments[lastArgId];\n if (typeof cb === 'function') {\n const scopeBoundCb = tracer.getContext().bind(context.active(), cb);\n return tracer.trace(name, optionsObj, (_span, done)=>{\n arguments[lastArgId] = function(err) {\n done == null ? void 0 : done(err);\n return scopeBoundCb.apply(this, arguments);\n };\n return fn.apply(this, arguments);\n });\n } else {\n return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments));\n }\n };\n }\n startSpan(...args) {\n const [type, options] = args;\n const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n return this.getTracerInstance().startSpan(type, options, spanContext);\n }\n getSpanContext(parentSpan) {\n const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined;\n return spanContext;\n }\n getRootSpanAttributes() {\n const spanId = context.active().getValue(rootSpanIdKey);\n return rootSpanAttributesStore.get(spanId);\n }\n setRootSpanAttribute(key, value) {\n const spanId = context.active().getValue(rootSpanIdKey);\n const attributes = rootSpanAttributesStore.get(spanId);\n if (attributes) {\n attributes.set(key, value);\n }\n }\n}\nconst getTracer = (()=>{\n const tracer = new NextTracerImpl();\n return ()=>tracer;\n})();\nexport { getTracer, SpanStatusCode, SpanKind };\n\n//# sourceMappingURL=tracer.js.map","import { HeadersAdapter } from '../web/spec-extension/adapters/headers';\nimport { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants';\nimport { getTracer } from '../lib/trace/tracer';\nimport { NodeSpan } from '../lib/trace/constants';\nexport function wrapApiHandler(page, handler) {\n return (...args)=>{\n getTracer().setRootSpanAttribute('next.route', page);\n // Call API route method\n return getTracer().trace(NodeSpan.runHandler, {\n spanName: `executing api route (pages) ${page}`\n }, ()=>handler(...args));\n };\n}\n/**\n *\n * @param res response object\n * @param statusCode `HTTP` status code of response\n */ export function sendStatusCode(res, statusCode) {\n res.statusCode = statusCode;\n return res;\n}\n/**\n *\n * @param res response object\n * @param [statusOrUrl] `HTTP` status code of redirect\n * @param url URL of redirect\n */ export function redirect(res, statusOrUrl, url) {\n if (typeof statusOrUrl === 'string') {\n url = statusOrUrl;\n statusOrUrl = 307;\n }\n if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {\n throw Object.defineProperty(new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`), \"__NEXT_ERROR_CODE\", {\n value: \"E389\",\n enumerable: false,\n configurable: true\n });\n }\n res.writeHead(statusOrUrl, {\n Location: url\n });\n res.write(url);\n res.end();\n return res;\n}\nexport function checkIsOnDemandRevalidate(req, previewProps) {\n const headers = HeadersAdapter.from(req.headers);\n const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER);\n const isOnDemandRevalidate = previewModeId === previewProps.previewModeId;\n const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER);\n return {\n isOnDemandRevalidate,\n revalidateOnlyGenerated\n };\n}\nexport const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`;\nexport const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`;\nexport const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024;\nexport const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA);\nexport const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS);\nexport function clearPreviewData(res, options = {}) {\n if (SYMBOL_CLEARED_COOKIES in res) {\n return res;\n }\n const { serialize } = require('next/dist/compiled/cookie');\n const previous = res.getHeader('Set-Cookie');\n res.setHeader(`Set-Cookie`, [\n ...typeof previous === 'string' ? [\n previous\n ] : Array.isArray(previous) ? previous : [],\n serialize(COOKIE_NAME_PRERENDER_BYPASS, '', {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n expires: new Date(0),\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n ...options.path !== undefined ? {\n path: options.path\n } : undefined\n }),\n serialize(COOKIE_NAME_PRERENDER_DATA, '', {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n expires: new Date(0),\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n ...options.path !== undefined ? {\n path: options.path\n } : undefined\n })\n ]);\n Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, {\n value: true,\n enumerable: false\n });\n return res;\n}\n/**\n * Custom error class\n */ export class ApiError extends Error {\n constructor(statusCode, message){\n super(message);\n this.statusCode = statusCode;\n }\n}\n/**\n * Sends error in `response`\n * @param res response object\n * @param statusCode of response\n * @param message of response\n */ export function sendError(res, statusCode, message) {\n res.statusCode = statusCode;\n res.statusMessage = message;\n res.end(message);\n}\n/**\n * Execute getter function only if its needed\n * @param LazyProps `req` and `params` for lazyProp\n * @param prop name of property\n * @param getter function to get data\n */ export function setLazyProp({ req }, prop, getter) {\n const opts = {\n configurable: true,\n enumerable: true\n };\n const optsReset = {\n ...opts,\n writable: true\n };\n Object.defineProperty(req, prop, {\n ...opts,\n get: ()=>{\n const value = getter();\n // we set the property on the object to avoid recalculating it\n Object.defineProperty(req, prop, {\n ...optsReset,\n value\n });\n return value;\n },\n set: (value)=>{\n Object.defineProperty(req, prop, {\n ...optsReset,\n value\n });\n }\n });\n}\n\n//# sourceMappingURL=index.js.map","import { COOKIE_NAME_PRERENDER_BYPASS, checkIsOnDemandRevalidate } from '../api-utils';\nexport class DraftModeProvider {\n constructor(previewProps, req, cookies, mutableCookies){\n var _cookies_get;\n // The logic for draftMode() is very similar to tryGetPreviewData()\n // but Draft Mode does not have any data associated with it.\n const isOnDemandRevalidate = previewProps && checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate;\n const cookieValue = (_cookies_get = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)) == null ? void 0 : _cookies_get.value;\n this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`.\n process.env.NODE_ENV !== 'production' && previewProps.previewModeId === 'development-id'));\n this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId;\n this._mutableCookies = mutableCookies;\n }\n get isEnabled() {\n return this._isEnabled;\n }\n enable() {\n if (!this._previewModeId) {\n throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), \"__NEXT_ERROR_CODE\", {\n value: \"E93\",\n enumerable: false,\n configurable: true\n });\n }\n this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: this._previewModeId,\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/'\n });\n this._isEnabled = true;\n }\n disable() {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: '',\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n expires: new Date(0)\n });\n this._isEnabled = false;\n }\n}\n\n//# sourceMappingURL=draft-mode-provider.js.map","import { FLIGHT_HEADERS } from '../../client/components/app-router-headers';\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers';\nimport { MutableRequestCookiesAdapter, RequestCookiesAdapter, responseCookiesToRequestCookies, createCookiesWithMutableAccessCheck } from '../web/spec-extension/adapters/request-cookies';\nimport { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies';\nimport { DraftModeProvider } from './draft-mode-provider';\nimport { splitCookiesString } from '../web/utils';\nfunction getHeaders(headers) {\n const cleaned = HeadersAdapter.from(headers);\n for (const header of FLIGHT_HEADERS){\n cleaned.delete(header);\n }\n return HeadersAdapter.seal(cleaned);\n}\nfunction getMutableCookies(headers, onUpdateCookies) {\n const cookies = new RequestCookies(HeadersAdapter.from(headers));\n return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies);\n}\n/**\n * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`),\n * then merge those into the existing cookie object, so that when `cookies()` is accessed\n * it's able to read the newly set cookies.\n */ function mergeMiddlewareCookies(req, existingCookies) {\n if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') {\n const setCookieValue = req.headers['x-middleware-set-cookie'];\n const responseHeaders = new Headers();\n for (const cookie of splitCookiesString(setCookieValue)){\n responseHeaders.append('set-cookie', cookie);\n }\n const responseCookies = new ResponseCookies(responseHeaders);\n // Transfer cookies from ResponseCookies to RequestCookies\n for (const cookie of responseCookies.getAll()){\n existingCookies.set(cookie);\n }\n }\n}\nexport function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) {\n return createRequestStoreImpl(// Pages start in render phase by default\n 'render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams);\n}\nexport function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) {\n return createRequestStoreImpl(// API routes start in action phase by default\n 'action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null);\n}\nfunction createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) {\n function defaultOnUpdateCookies(cookies) {\n if (res) {\n res.setHeader('Set-Cookie', cookies);\n }\n }\n const cache = {};\n return {\n type: 'request',\n phase,\n implicitTags,\n // Rather than just using the whole `url` here, we pull the parts we want\n // to ensure we don't use parts of the URL that we shouldn't. This also\n // lets us avoid requiring an empty string for `search` in the type.\n url: {\n pathname: url.pathname,\n search: url.search ?? ''\n },\n rootParams,\n get headers () {\n if (!cache.headers) {\n // Seal the headers object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.headers = getHeaders(req.headers);\n }\n return cache.headers;\n },\n get cookies () {\n if (!cache.cookies) {\n // if middleware is setting cookie(s), then include those in\n // the initial cached cookies so they can be read in render\n const requestCookies = new RequestCookies(HeadersAdapter.from(req.headers));\n mergeMiddlewareCookies(req, requestCookies);\n // Seal the cookies object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.cookies = RequestCookiesAdapter.seal(requestCookies);\n }\n return cache.cookies;\n },\n set cookies (value){\n cache.cookies = value;\n },\n get mutableCookies () {\n if (!cache.mutableCookies) {\n const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined));\n mergeMiddlewareCookies(req, mutableCookies);\n cache.mutableCookies = mutableCookies;\n }\n return cache.mutableCookies;\n },\n get userspaceMutableCookies () {\n if (!cache.userspaceMutableCookies) {\n const userspaceMutableCookies = createCookiesWithMutableAccessCheck(this);\n cache.userspaceMutableCookies = userspaceMutableCookies;\n }\n return cache.userspaceMutableCookies;\n },\n get draftMode () {\n if (!cache.draftMode) {\n cache.draftMode = new DraftModeProvider(previewProps, req, this.cookies, this.mutableCookies);\n }\n return cache.draftMode;\n },\n renderResumeDataCache: renderResumeDataCache ?? null,\n isHmrRefresh,\n serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache,\n devFallbackParams\n };\n}\nexport function synchronizeMutableCookies(store) {\n // TODO: does this need to update headers as well?\n store.cookies = RequestCookiesAdapter.seal(responseCookiesToRequestCookies(store.mutableCookies));\n}\n\n//# sourceMappingURL=request-store.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const workUnitAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=work-unit-async-storage-instance.js.map","export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n","// Share the instance module in the next-shared layer\nimport { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nimport { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nexport { workUnitAsyncStorageInstance as workUnitAsyncStorage };\nexport function throwForMissingRequestStore(callingExpression) {\n throw Object.defineProperty(new Error(`\\`${callingExpression}\\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), \"__NEXT_ERROR_CODE\", {\n value: \"E251\",\n enumerable: false,\n configurable: true\n });\n}\nexport function throwInvariantForMissingStore() {\n throw Object.defineProperty(new InvariantError('Expected workUnitAsyncStorage to have a store.'), \"__NEXT_ERROR_CODE\", {\n value: \"E696\",\n enumerable: false,\n configurable: true\n });\n}\nexport function getPrerenderResumeDataCache(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-ppr':\n return workUnitStore.prerenderResumeDataCache;\n case 'prerender-client':\n // TODO eliminate fetch caching in client scope and stop exposing this data\n // cache during SSR.\n return workUnitStore.prerenderResumeDataCache;\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getRenderResumeDataCache(workUnitStore) {\n switch(workUnitStore.type){\n case 'request':\n return workUnitStore.renderResumeDataCache;\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-client':\n if (workUnitStore.renderResumeDataCache) {\n // If we are in a prerender, we might have a render resume data cache\n // that is used to read from prefilled caches.\n return workUnitStore.renderResumeDataCache;\n }\n // fallthrough\n case 'prerender-ppr':\n // Otherwise we return the mutable resume data cache here as an immutable\n // version of the cache as it can also be used for reading.\n return workUnitStore.prerenderResumeDataCache;\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-legacy':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getHmrRefreshHash(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'prerender':\n case 'prerender-runtime':\n return workUnitStore.hmrRefreshHash;\n case 'request':\n var _workUnitStore_cookies_get;\n return (_workUnitStore_cookies_get = workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value;\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\nexport function isHmrRefresh(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.isHmrRefresh ?? false;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return false;\n}\nexport function getServerComponentsHmrCache(workStore, workUnitStore) {\n if (workStore.dev) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.serverComponentsHmrCache;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\n/**\n * Returns a draft mode provider only if draft mode is enabled.\n */ export function getDraftModeProviderForCacheScope(workStore, workUnitStore) {\n if (workStore.isDraftMode) {\n switch(workUnitStore.type){\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-runtime':\n case 'request':\n return workUnitStore.draftMode;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n break;\n default:\n workUnitStore;\n }\n }\n return undefined;\n}\nexport function getCacheSignal(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n return workUnitStore.cacheSignal;\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\nexport function getRuntimeStagePromise(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender-runtime':\n case 'private-cache':\n return workUnitStore.runtimeStagePromise;\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'unstable-cache':\n return null;\n default:\n return workUnitStore;\n }\n}\n\n//# sourceMappingURL=work-unit-async-storage.external.js.map","/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */ class LRUNode {\n constructor(key, data, size){\n this.prev = null;\n this.next = null;\n this.key = key;\n this.data = data;\n this.size = size;\n }\n}\n/**\n * Sentinel node used for head/tail boundaries.\n * These nodes don't contain actual cache data but simplify list operations.\n */ class SentinelNode {\n constructor(){\n this.prev = null;\n this.next = null;\n }\n}\n/**\n * LRU (Least Recently Used) Cache implementation using a doubly-linked list\n * and hash map for O(1) operations.\n *\n * Algorithm:\n * - Uses a doubly-linked list to maintain access order (most recent at head)\n * - Hash map provides O(1) key-to-node lookup\n * - Sentinel head/tail nodes simplify edge case handling\n * - Size-based eviction supports custom size calculation functions\n *\n * Data Structure Layout:\n * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL\n *\n * Operations:\n * - get(): Move accessed node to head (mark as most recent)\n * - set(): Add new node at head, evict from tail if over capacity\n * - Eviction: Remove least recent node (tail.prev) when size exceeds limit\n */ export class LRUCache {\n constructor(maxSize, calculateSize, onEvict){\n this.cache = new Map();\n this.totalSize = 0;\n this.maxSize = maxSize;\n this.calculateSize = calculateSize;\n this.onEvict = onEvict;\n // Create sentinel nodes to simplify doubly-linked list operations\n // HEAD <-> TAIL (empty list)\n this.head = new SentinelNode();\n this.tail = new SentinelNode();\n this.head.next = this.tail;\n this.tail.prev = this.head;\n }\n /**\n * Adds a node immediately after the head (marks as most recently used).\n * Used when inserting new items or when an item is accessed.\n * PRECONDITION: node must be disconnected (prev/next should be null)\n */ addToHead(node) {\n node.prev = this.head;\n node.next = this.head.next;\n // head.next is always non-null (points to tail or another node)\n this.head.next.prev = node;\n this.head.next = node;\n }\n /**\n * Removes a node from its current position in the doubly-linked list.\n * Updates the prev/next pointers of adjacent nodes to maintain list integrity.\n * PRECONDITION: node must be connected (prev/next are non-null)\n */ removeNode(node) {\n // Connected nodes always have non-null prev/next\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }\n /**\n * Moves an existing node to the head position (marks as most recently used).\n * This is the core LRU operation - accessed items become most recent.\n */ moveToHead(node) {\n this.removeNode(node);\n this.addToHead(node);\n }\n /**\n * Removes and returns the least recently used node (the one before tail).\n * This is called during eviction when the cache exceeds capacity.\n * PRECONDITION: cache is not empty (ensured by caller)\n */ removeTail() {\n const lastNode = this.tail.prev;\n // tail.prev is always non-null and always LRUNode when cache is not empty\n this.removeNode(lastNode);\n return lastNode;\n }\n /**\n * Sets a key-value pair in the cache.\n * If the key exists, updates the value and moves to head.\n * If new, adds at head and evicts from tail if necessary.\n *\n * Time Complexity:\n * - O(1) for uniform item sizes\n * - O(k) where k is the number of items evicted (can be O(N) for variable sizes)\n */ set(key, value) {\n const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1;\n if (size <= 0) {\n throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), \"__NEXT_ERROR_CODE\", {\n value: \"E789\",\n enumerable: false,\n configurable: true\n });\n }\n if (size > this.maxSize) {\n console.warn('Single item size exceeds maxSize');\n return false;\n }\n const existing = this.cache.get(key);\n if (existing) {\n // Update existing node: adjust size and move to head (most recent)\n existing.data = value;\n this.totalSize = this.totalSize - existing.size + size;\n existing.size = size;\n this.moveToHead(existing);\n } else {\n // Add new node at head (most recent position)\n const newNode = new LRUNode(key, value, size);\n this.cache.set(key, newNode);\n this.addToHead(newNode);\n this.totalSize += size;\n }\n // Evict least recently used items until under capacity\n while(this.totalSize > this.maxSize && this.cache.size > 0){\n const tail = this.removeTail();\n this.cache.delete(tail.key);\n this.totalSize -= tail.size;\n this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data);\n }\n return true;\n }\n /**\n * Checks if a key exists in the cache.\n * This is a pure query operation - does NOT update LRU order.\n *\n * Time Complexity: O(1)\n */ has(key) {\n return this.cache.has(key);\n }\n /**\n * Retrieves a value by key and marks it as most recently used.\n * Moving to head maintains the LRU property for future evictions.\n *\n * Time Complexity: O(1)\n */ get(key) {\n const node = this.cache.get(key);\n if (!node) return undefined;\n // Mark as most recently used by moving to head\n this.moveToHead(node);\n return node.data;\n }\n /**\n * Returns an iterator over the cache entries. The order is outputted in the\n * order of most recently used to least recently used.\n */ *[Symbol.iterator]() {\n let current = this.head.next;\n while(current && current !== this.tail){\n // Between head and tail, current is always LRUNode\n const node = current;\n yield [\n node.key,\n node.data\n ];\n current = current.next;\n }\n }\n /**\n * Removes a specific key from the cache.\n * Updates both the hash map and doubly-linked list.\n *\n * Note: This is an explicit removal and does NOT trigger the `onEvict`\n * callback. Use this for intentional deletions where eviction tracking\n * is not needed.\n *\n * Time Complexity: O(1)\n */ remove(key) {\n const node = this.cache.get(key);\n if (!node) return;\n this.removeNode(node);\n this.cache.delete(key);\n this.totalSize -= node.size;\n }\n /**\n * Returns the number of items in the cache.\n */ get size() {\n return this.cache.size;\n }\n /**\n * Returns the current total size of all cached items.\n * This uses the custom size calculation if provided.\n */ get currentSize() {\n return this.totalSize;\n }\n}\n\n//# sourceMappingURL=lru-cache.js.map","import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n","/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n","import DefaultCacheHandler from '../lib/cache-handlers/default.external';\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{\n console.log(`use-cache: ${message}`, ...args);\n} : undefined;\nconst handlersSymbol = Symbol.for('@next/cache-handlers');\nconst handlersMapSymbol = Symbol.for('@next/cache-handlers-map');\nconst handlersSetSymbol = Symbol.for('@next/cache-handlers-set');\n/**\n * The reference to the cache handlers. We store the cache handlers on the\n * global object so that we can access the same instance across different\n * boundaries (such as different copies of the same module).\n */ const reference = globalThis;\n/**\n * Initialize the cache handlers.\n * @returns `true` if the cache handlers were initialized, `false` if they were already initialized.\n */ export function initializeCacheHandlers() {\n // If the cache handlers have already been initialized, don't do it again.\n if (reference[handlersMapSymbol]) {\n debug == null ? void 0 : debug('cache handlers already initialized');\n return false;\n }\n debug == null ? void 0 : debug('initializing cache handlers');\n reference[handlersMapSymbol] = new Map();\n // Initialize the cache from the symbol contents first.\n if (reference[handlersSymbol]) {\n let fallback;\n if (reference[handlersSymbol].DefaultCache) {\n debug == null ? void 0 : debug('setting \"default\" cache handler from symbol');\n fallback = reference[handlersSymbol].DefaultCache;\n } else {\n debug == null ? void 0 : debug('setting \"default\" cache handler from default');\n fallback = DefaultCacheHandler;\n }\n reference[handlersMapSymbol].set('default', fallback);\n if (reference[handlersSymbol].RemoteCache) {\n debug == null ? void 0 : debug('setting \"remote\" cache handler from symbol');\n reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache);\n } else {\n debug == null ? void 0 : debug('setting \"remote\" cache handler from default');\n reference[handlersMapSymbol].set('remote', fallback);\n }\n } else {\n debug == null ? void 0 : debug('setting \"default\" cache handler from default');\n reference[handlersMapSymbol].set('default', DefaultCacheHandler);\n debug == null ? void 0 : debug('setting \"remote\" cache handler from default');\n reference[handlersMapSymbol].set('remote', DefaultCacheHandler);\n }\n // Create a set of the cache handlers.\n reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values());\n return true;\n}\n/**\n * Get a cache handler by kind.\n * @param kind - The kind of cache handler to get.\n * @returns The cache handler, or `undefined` if it does not exist.\n * @throws If the cache handlers are not initialized.\n */ export function getCacheHandler(kind) {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol]) {\n throw Object.defineProperty(new Error('Cache handlers not initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E649\",\n enumerable: false,\n configurable: true\n });\n }\n return reference[handlersMapSymbol].get(kind);\n}\n/**\n * Get a set iterator over the cache handlers.\n * @returns An iterator over the cache handlers, or `undefined` if they are not\n * initialized.\n */ export function getCacheHandlers() {\n if (!reference[handlersSetSymbol]) {\n return undefined;\n }\n return reference[handlersSetSymbol].values();\n}\n/**\n * Get a map iterator over the cache handlers (keyed by kind).\n * @returns An iterator over the cache handler entries, or `undefined` if they\n * are not initialized.\n * @throws If the cache handlers are not initialized.\n */ export function getCacheHandlerEntries() {\n if (!reference[handlersMapSymbol]) {\n return undefined;\n }\n return reference[handlersMapSymbol].entries();\n}\n/**\n * Set a cache handler by kind.\n * @param kind - The kind of cache handler to set.\n * @param cacheHandler - The cache handler to set.\n */ export function setCacheHandler(kind, cacheHandler) {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) {\n throw Object.defineProperty(new Error('Cache handlers not initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E649\",\n enumerable: false,\n configurable: true\n });\n }\n debug == null ? void 0 : debug('setting cache handler for \"%s\"', kind);\n reference[handlersMapSymbol].set(kind, cacheHandler);\n reference[handlersSetSymbol].add(cacheHandler);\n}\n\n//# sourceMappingURL=handlers.js.map","import { getCacheHandlers } from './use-cache/handlers';\n/** Run a callback, and execute any *new* revalidations added during its runtime. */ export async function withExecuteRevalidates(store, callback) {\n if (!store) {\n return callback();\n }\n // If we executed any revalidates during the request, then we don't want to execute them again.\n // save the state so we can check if anything changed after we're done running callbacks.\n const savedRevalidationState = cloneRevalidationState(store);\n try {\n return await callback();\n } finally{\n // Check if we have any new revalidates, and if so, wait until they are all resolved.\n const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store));\n await executeRevalidates(store, newRevalidates);\n }\n}\nfunction cloneRevalidationState(store) {\n return {\n pendingRevalidatedTags: store.pendingRevalidatedTags ? [\n ...store.pendingRevalidatedTags\n ] : [],\n pendingRevalidates: {\n ...store.pendingRevalidates\n },\n pendingRevalidateWrites: store.pendingRevalidateWrites ? [\n ...store.pendingRevalidateWrites\n ] : []\n };\n}\nfunction diffRevalidationState(prev, curr) {\n const prevTags = new Set(prev.pendingRevalidatedTags);\n const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites);\n return {\n pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)),\n pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))),\n pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise))\n };\n}\nasync function revalidateTags(tags, incrementalCache) {\n if (tags.length === 0) {\n return;\n }\n const promises = [];\n if (incrementalCache) {\n promises.push(incrementalCache.revalidateTag(tags));\n }\n const handlers = getCacheHandlers();\n if (handlers) {\n for (const handler of handlers){\n promises.push(handler.expireTags(...tags));\n }\n }\n await Promise.all(promises);\n}\nexport async function executeRevalidates(workStore, state) {\n const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? [];\n const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {};\n const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? [];\n return Promise.all([\n revalidateTags(pendingRevalidatedTags, workStore.incrementalCache),\n ...Object.values(pendingRevalidates),\n ...pendingRevalidateWrites\n ]);\n}\n\n//# sourceMappingURL=revalidation-utils.js.map","const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), \"__NEXT_ERROR_CODE\", {\n value: \"E504\",\n enumerable: false,\n configurable: true\n});\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n static bind(fn) {\n return fn;\n }\n}\nconst maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;\nexport function createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nexport function bindSnapshot(fn) {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn);\n }\n return FakeAsyncLocalStorage.bind(fn);\n}\nexport function createSnapshot() {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot();\n }\n return function(fn, ...args) {\n return fn(...args);\n };\n}\n\n//# sourceMappingURL=async-local-storage.js.map","import { createAsyncLocalStorage } from './async-local-storage';\nexport const afterTaskAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=after-task-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { afterTaskAsyncStorage };\n\n//# sourceMappingURL=after-task-async-storage.external.js.map","import PromiseQueue from 'next/dist/compiled/p-queue';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nimport { isThenable } from '../../shared/lib/is-thenable';\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { withExecuteRevalidates } from '../revalidation-utils';\nimport { bindSnapshot } from '../app-render/async-local-storage';\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external';\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external';\nexport class AfterContext {\n constructor({ waitUntil, onClose, onTaskError }){\n this.workUnitStores = new Set();\n this.waitUntil = waitUntil;\n this.onClose = onClose;\n this.onTaskError = onTaskError;\n this.callbackQueue = new PromiseQueue();\n this.callbackQueue.pause();\n }\n after(task) {\n if (isThenable(task)) {\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable();\n }\n this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error)));\n } else if (typeof task === 'function') {\n // TODO(after): implement tracing\n this.addCallback(task);\n } else {\n throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), \"__NEXT_ERROR_CODE\", {\n value: \"E50\",\n enumerable: false,\n configurable: true\n });\n }\n }\n addCallback(callback) {\n // if something is wrong, throw synchronously, bubbling up to the `after` callsite.\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable();\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n this.workUnitStores.add(workUnitStore);\n }\n const afterTaskStore = afterTaskAsyncStorage.getStore();\n // This is used for checking if request APIs can be called inside `after`.\n // Note that we need to check the phase in which the *topmost* `after` was called (which should be \"action\"),\n // not the current phase (which might be \"after\" if we're in a nested after).\n // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`.\n const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after\n : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after\n ;\n // this should only happen once.\n if (!this.runCallbacksOnClosePromise) {\n this.runCallbacksOnClosePromise = this.runCallbacksOnClose();\n this.waitUntil(this.runCallbacksOnClosePromise);\n }\n // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es).\n // We do this because we want all of these to be equivalent in every regard except timing:\n // after(() => x())\n // after(x())\n // await x()\n const wrappedCallback = bindSnapshot(async ()=>{\n try {\n await afterTaskAsyncStorage.run({\n rootTaskSpawnPhase\n }, ()=>callback());\n } catch (error) {\n this.reportTaskError('function', error);\n }\n });\n this.callbackQueue.add(wrappedCallback);\n }\n async runCallbacksOnClose() {\n await new Promise((resolve)=>this.onClose(resolve));\n return this.runCallbacks();\n }\n async runCallbacks() {\n if (this.callbackQueue.size === 0) return;\n for (const workUnitStore of this.workUnitStores){\n workUnitStore.phase = 'after';\n }\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Missing workStore in AfterContext.runCallbacks'), \"__NEXT_ERROR_CODE\", {\n value: \"E547\",\n enumerable: false,\n configurable: true\n });\n }\n return withExecuteRevalidates(workStore, ()=>{\n this.callbackQueue.start();\n return this.callbackQueue.onIdle();\n });\n }\n reportTaskError(taskKind, error) {\n // TODO(after): this is fine for now, but will need better intergration with our error reporting.\n // TODO(after): should we log this if we have a onTaskError callback?\n console.error(taskKind === 'promise' ? `A promise passed to \\`after()\\` rejected:` : `An error occurred in a function passed to \\`after()\\`:`, error);\n if (this.onTaskError) {\n // this is very defensive, but we really don't want anything to blow up in an error handler\n try {\n this.onTaskError == null ? void 0 : this.onTaskError.call(this, error);\n } catch (handlerError) {\n console.error(Object.defineProperty(new InvariantError('`onTaskError` threw while handling an error thrown from an `after` task', {\n cause: handlerError\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E569\",\n enumerable: false,\n configurable: true\n }));\n }\n }\n }\n}\nfunction errorWaitUntilNotAvailable() {\n throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), \"__NEXT_ERROR_CODE\", {\n value: \"E91\",\n enumerable: false,\n configurable: true\n });\n}\n\n//# sourceMappingURL=after-context.js.map","/**\n * Calls the given async function only when the returned promise-like object is\n * awaited. Afterwards, it provides the resolved value synchronously as `value`\n * property.\n */ export function createLazyResult(fn) {\n let pendingResult;\n const result = {\n then (onfulfilled, onrejected) {\n if (!pendingResult) {\n pendingResult = fn();\n }\n pendingResult.then((value)=>{\n result.value = value;\n }).catch(()=>{\n // The externally awaited result will be rejected via `onrejected`. We\n // don't need to handle it here. But we do want to avoid an unhandled\n // rejection.\n });\n return pendingResult.then(onfulfilled, onrejected);\n }\n };\n return result;\n}\nexport function isResolvedLazyResult(result) {\n return result.hasOwnProperty('value');\n}\n\n//# sourceMappingURL=lazy-result.js.map","import { AfterContext } from '../after/after-context';\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths';\nimport { createLazyResult } from '../lib/lazy-result';\nimport { getCacheHandlerEntries } from '../use-cache/handlers';\nimport { createSnapshot } from '../app-render/async-local-storage';\nexport function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) {\n /**\n * Rules of Static & Dynamic HTML:\n *\n * 1.) We must generate static HTML unless the caller explicitly opts\n * in to dynamic HTML support.\n *\n * 2.) If dynamic HTML support is requested, we must honor that request\n * or throw an error. It is the sole responsibility of the caller to\n * ensure they aren't e.g. requesting dynamic HTML for an AMP page.\n *\n * 3.) If the request is in draft mode, we must generate dynamic HTML.\n *\n * 4.) If the request is a server action, we must generate dynamic HTML.\n *\n * These rules help ensure that other existing features like request caching,\n * coalescing, and ISR continue working as intended.\n */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction;\n const isDevelopment = renderOpts.dev ?? false;\n const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is\n // when we are performing a static generation and we either are in debug\n // mode, or tracking fetch metrics was specifically opted into.\n isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1');\n const store = {\n isStaticGeneration,\n page,\n route: normalizeAppPath(page),\n incrementalCache: // we fallback to a global incremental cache for edge-runtime locally\n // so that it can access the fs cache without mocks\n renderOpts.incrementalCache || globalThis.__incrementalCache,\n cacheLifeProfiles: renderOpts.cacheLifeProfiles,\n isRevalidate: renderOpts.isRevalidate,\n isBuildTimePrerendering: renderOpts.nextExport,\n hasReadableErrorStacks: renderOpts.hasReadableErrorStacks,\n fetchCache: renderOpts.fetchCache,\n isOnDemandRevalidate: renderOpts.isOnDemandRevalidate,\n isDraftMode: renderOpts.isDraftMode,\n isPrefetchRequest,\n buildId,\n reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {},\n assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '',\n afterContext: createAfterContext(renderOpts),\n cacheComponentsEnabled: renderOpts.experimental.cacheComponents,\n dev: isDevelopment,\n previouslyRevalidatedTags,\n refreshTagsByCacheKind: createRefreshTagsByCacheKind(),\n runInCleanSnapshot: createSnapshot(),\n shouldTrackFetchMetrics\n };\n // TODO: remove this when we resolve accessing the store outside the execution context\n renderOpts.store = store;\n return store;\n}\nfunction createAfterContext(renderOpts) {\n const { waitUntil, onClose, onAfterTaskError } = renderOpts;\n return new AfterContext({\n waitUntil,\n onClose,\n onTaskError: onAfterTaskError\n });\n}\n/**\n * Creates a map with lazy results that refresh tags for the respective cache\n * kind when they're awaited for the first time.\n */ function createRefreshTagsByCacheKind() {\n const refreshTagsByCacheKind = new Map();\n const cacheHandlers = getCacheHandlerEntries();\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers){\n if ('refreshTags' in cacheHandler) {\n refreshTagsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.refreshTags()));\n }\n }\n }\n return refreshTagsByCacheKind;\n}\n\n//# sourceMappingURL=work-store.js.map","/** Monitor when the consumer finishes reading the response body.\nthat's as close as we can get to `res.on('close')` using web APIs.\n*/ export function trackBodyConsumed(body, onEnd) {\n if (typeof body === 'string') {\n const generator = async function* generate() {\n const encoder = new TextEncoder();\n yield encoder.encode(body);\n onEnd();\n };\n // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice\n return generator();\n } else {\n return trackStreamConsumed(body, onEnd);\n }\n}\nexport function trackStreamConsumed(stream, onEnd) {\n // NOTE: This function must handle `stream` being aborted or cancelled,\n // so it can't just be this:\n //\n // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } }))\n //\n // because that doesn't handle cancellations.\n // (and cancellation handling via `Transformer.cancel` is only available in node >20)\n const dest = new TransformStream();\n const runOnEnd = ()=>onEnd();\n stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd);\n return dest.readable;\n}\nexport class CloseController {\n onClose(callback) {\n if (this.isClosed) {\n throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), \"__NEXT_ERROR_CODE\", {\n value: \"E365\",\n enumerable: false,\n configurable: true\n });\n }\n this.target.addEventListener('close', callback);\n this.listeners++;\n }\n dispatchClose() {\n if (this.isClosed) {\n throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), \"__NEXT_ERROR_CODE\", {\n value: \"E229\",\n enumerable: false,\n configurable: true\n });\n }\n if (this.listeners > 0) {\n this.target.dispatchEvent(new Event('close'));\n }\n this.isClosed = true;\n }\n constructor(){\n this.target = new EventTarget();\n this.listeners = 0;\n this.isClosed = false;\n }\n}\n\n//# sourceMappingURL=web-on-close.js.map","/**\n * In edge runtime, these props directly accessed from environment variables.\n * - local: env vars will be injected through edge-runtime as runtime env vars\n * - deployment: env vars will be replaced by edge build pipeline\n */ export function getEdgePreviewProps() {\n return {\n previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '',\n previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '',\n previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || ''\n };\n}\n\n//# sourceMappingURL=get-edge-preview-props.js.map","import { createAsyncLocalStorage } from '../app-render/async-local-storage';\nexport function getBuiltinRequestContext() {\n const _globalThis = globalThis;\n const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL];\n return ctx == null ? void 0 : ctx.get();\n}\nconst NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context');\n/** \"@next/request-context\" has a different signature from AsyncLocalStorage,\n * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context).\n * We don't need a full AsyncContext adapter here, just having `.get()` is enough\n */ export function createLocalRequestContext() {\n const storage = createAsyncLocalStorage();\n return {\n get: ()=>storage.getStore(),\n run: (value, callback)=>storage.run(value, callback)\n };\n}\n\n//# sourceMappingURL=builtin-request-context.js.map","import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants';\nimport { getCacheHandlerEntries } from '../use-cache/handlers';\nimport { createLazyResult } from './lazy-result';\nconst getDerivedTags = (pathname)=>{\n const derivedTags = [\n `/layout`\n ];\n // we automatically add the current path segments as tags\n // for revalidatePath handling\n if (pathname.startsWith('/')) {\n const pathnameParts = pathname.split('/');\n for(let i = 1; i < pathnameParts.length + 1; i++){\n let curPathname = pathnameParts.slice(0, i).join('/');\n if (curPathname) {\n // all derived tags other than the page are layout tags\n if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) {\n curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`;\n }\n derivedTags.push(curPathname);\n }\n }\n }\n return derivedTags;\n};\n/**\n * Creates a map with lazy results that fetch the expiration value for the given\n * tags and respective cache kind when they're awaited for the first time.\n */ function createTagsExpirationsByCacheKind(tags) {\n const expirationsByCacheKind = new Map();\n const cacheHandlers = getCacheHandlerEntries();\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers){\n if ('getExpiration' in cacheHandler) {\n expirationsByCacheKind.set(kind, createLazyResult(async ()=>cacheHandler.getExpiration(...tags)));\n }\n }\n }\n return expirationsByCacheKind;\n}\nexport async function getImplicitTags(page, url, fallbackRouteParams) {\n const tags = [];\n const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0;\n // Add the derived tags from the page.\n const derivedTags = getDerivedTags(page);\n for (let tag of derivedTags){\n tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`;\n tags.push(tag);\n }\n // Add the tags from the pathname. If the route has unknown params, we don't\n // want to add the pathname as a tag, as it will be invalid.\n if (url.pathname && !hasFallbackRouteParams) {\n const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`;\n tags.push(tag);\n }\n return {\n tags,\n expirationsByCacheKind: createTagsExpirationsByCacheKind(tags)\n };\n}\n\n//# sourceMappingURL=implicit-tags.js.map","/**\n * Normalizes the raw RSC header value. Only the literal string \"1\" is treated\n * as a valid RSC request marker; malformed or repeated values are ignored.\n */ export function isRSCRequestHeader(value) {\n return value === '1';\n}\n\n//# sourceMappingURL=is-rsc-request.js.map","import { PageSignatureError } from './error';\nimport { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils';\nimport { NextFetchEvent, getWaitUntilPromiseFromEvent } from './spec-extension/fetch-event';\nimport { NextRequest } from './spec-extension/request';\nimport { NextResponse } from './spec-extension/response';\nimport { parseRelativeURL, getRelativeURL } from '../../shared/lib/router/utils/relativize-url';\nimport { NextURL } from './next-url';\nimport { stripInternalSearchParams } from '../internal-utils';\nimport { normalizeRscURL } from '../../shared/lib/router/utils/app-paths';\nimport { FLIGHT_HEADERS, NEXT_REWRITTEN_PATH_HEADER, NEXT_REWRITTEN_QUERY_HEADER, NEXT_RSC_UNION_QUERY, RSC_HEADER } from '../../client/components/app-router-headers';\nimport { ensureInstrumentationRegistered } from './globals';\nimport { createRequestStoreForAPI } from '../async-storage/request-store';\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external';\nimport { createWorkStore } from '../async-storage/work-store';\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers';\nimport { getTracer } from '../lib/trace/tracer';\nimport { MiddlewareSpan } from '../lib/trace/constants';\nimport { CloseController } from './web-on-close';\nimport { getEdgePreviewProps } from './get-edge-preview-props';\nimport { getBuiltinRequestContext } from '../after/builtin-request-context';\nimport { getImplicitTags } from '../lib/implicit-tags';\nimport { isRSCRequestHeader } from '../lib/is-rsc-request';\nexport class NextRequestHint extends NextRequest {\n constructor(params){\n super(params.input, params.init);\n this.sourcePage = params.page;\n }\n get request() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n respondWith() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n waitUntil() {\n throw Object.defineProperty(new PageSignatureError({\n page: this.sourcePage\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n}\nconst headersGetter = {\n keys: (headers)=>Array.from(headers.keys()),\n get: (headers, key)=>headers.get(key) ?? undefined\n};\nlet propagator = (request, fn)=>{\n const tracer = getTracer();\n return tracer.withPropagatedContext(request.headers, fn, headersGetter);\n};\nlet testApisIntercepted = false;\nfunction ensureTestApisIntercepted() {\n if (!testApisIntercepted) {\n testApisIntercepted = true;\n if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') {\n const { interceptTestApis, wrapRequestHandler } = // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm\n require('next/dist/experimental/testmode/server-edge');\n interceptTestApis();\n propagator = wrapRequestHandler(propagator);\n }\n }\n}\nexport async function adapter(params) {\n var _getBuiltinRequestContext;\n ensureTestApisIntercepted();\n await ensureInstrumentationRegistered();\n // TODO-APP: use explicit marker for this\n const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined';\n params.request.url = normalizeRscURL(params.request.url);\n const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new NextURL(params.request.url, {\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator.\n // Instead we use the keys before iteration.\n const keys = [\n ...requestURL.searchParams.keys()\n ];\n for (const key of keys){\n const value = requestURL.searchParams.getAll(key);\n const normalizedKey = normalizeNextQueryParam(key);\n if (normalizedKey) {\n requestURL.searchParams.delete(normalizedKey);\n for (const val of value){\n requestURL.searchParams.append(normalizedKey, val);\n }\n requestURL.searchParams.delete(key);\n }\n }\n // Ensure users only see page requests, never data requests.\n let buildId = process.env.__NEXT_BUILD_ID || '';\n if ('buildId' in requestURL) {\n buildId = requestURL.buildId || '';\n requestURL.buildId = '';\n }\n const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers);\n const isNextDataRequest = requestHeaders.has('x-nextjs-data');\n const isRSCRequest = isRSCRequestHeader(requestHeaders.get(RSC_HEADER));\n if (isNextDataRequest && requestURL.pathname === '/index') {\n requestURL.pathname = '/';\n }\n const flightHeaders = new Map();\n // Headers should only be stripped for middleware\n if (!isEdgeRendering) {\n for (const header of FLIGHT_HEADERS){\n const value = requestHeaders.get(header);\n if (value !== null) {\n flightHeaders.set(header, value);\n requestHeaders.delete(header);\n }\n }\n }\n const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? new URL(params.request.url) : requestURL;\n const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY);\n const request = new NextRequestHint({\n page: params.page,\n // Strip internal query parameters off the request.\n input: stripInternalSearchParams(normalizeURL).toString(),\n init: {\n body: params.request.body,\n headers: requestHeaders,\n method: params.request.method,\n nextConfig: params.request.nextConfig,\n signal: params.request.signal\n }\n });\n /**\n * This allows to identify the request as a data request. The user doesn't\n * need to know about this property neither use it. We add it for testing\n * purposes.\n */ if (isNextDataRequest) {\n Object.defineProperty(request, '__isData', {\n enumerable: false,\n value: true\n });\n }\n if (// If we are inside of the next start sandbox\n // leverage the shared instance if not we need\n // to create a fresh cache instance each time\n !globalThis.__incrementalCacheShared && params.IncrementalCache) {\n ;\n globalThis.__incrementalCache = new params.IncrementalCache({\n CurCacheHandler: params.incrementalCacheHandler,\n minimalMode: process.env.NODE_ENV !== 'development',\n fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX,\n dev: process.env.NODE_ENV === 'development',\n requestHeaders: params.request.headers,\n getPrerenderManifest: ()=>{\n return {\n version: -1,\n routes: {},\n dynamicRoutes: {},\n notFoundRoutes: [],\n preview: getEdgePreviewProps()\n };\n }\n });\n }\n // if we're in an edge runtime sandbox, we should use the waitUntil\n // that we receive from the enclosing NextServer\n const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = getBuiltinRequestContext()) == null ? void 0 : _getBuiltinRequestContext.waitUntil);\n const event = new NextFetchEvent({\n request,\n page: params.page,\n context: outerWaitUntil ? {\n waitUntil: outerWaitUntil\n } : undefined\n });\n let response;\n let cookiesFromResponse;\n response = await propagator(request, ()=>{\n // we only care to make async storage available for middleware\n const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware';\n if (isMiddleware) {\n // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`),\n // so we have to inject it via DefinePlugin.\n // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`).\n const waitUntil = event.waitUntil.bind(event);\n const closeController = new CloseController();\n return getTracer().trace(MiddlewareSpan.execute, {\n spanName: `middleware ${request.method} ${request.nextUrl.pathname}`,\n attributes: {\n 'http.target': request.nextUrl.pathname,\n 'http.method': request.method\n }\n }, async ()=>{\n try {\n var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1;\n const onUpdateCookies = (cookies)=>{\n cookiesFromResponse = cookies;\n };\n const previewProps = getEdgePreviewProps();\n const page = '/' // Fake Work\n ;\n const fallbackRouteParams = null;\n const implicitTags = await getImplicitTags(page, request.nextUrl, fallbackRouteParams);\n const requestStore = createRequestStoreForAPI(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps);\n const workStore = createWorkStore({\n page,\n renderOpts: {\n cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife,\n experimental: {\n isRoutePPREnabled: false,\n cacheComponents: false,\n authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts)\n },\n supportsDynamicResponse: true,\n waitUntil,\n onClose: closeController.onClose.bind(closeController),\n onAfterTaskError: undefined\n },\n isPrefetchRequest: request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1',\n buildId: buildId ?? '',\n previouslyRevalidatedTags: []\n });\n return await workAsyncStorage.run(workStore, ()=>workUnitAsyncStorage.run(requestStore, params.handler, request, event));\n } finally{\n // middleware cannot stream, so we can consider the response closed\n // as soon as the handler returns.\n // we can delay running it until a bit later --\n // if it's needed, we'll have a `waitUntil` lock anyway.\n setTimeout(()=>{\n closeController.dispatchClose();\n }, 0);\n }\n });\n }\n return params.handler(request, event);\n });\n // check if response is a Response object\n if (response && !(response instanceof Response)) {\n throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), \"__NEXT_ERROR_CODE\", {\n value: \"E567\",\n enumerable: false,\n configurable: true\n });\n }\n if (response && cookiesFromResponse) {\n response.headers.set('set-cookie', cookiesFromResponse);\n }\n /**\n * For rewrites we must always include the locale in the final pathname\n * so we re-create the NextURL forcing it to include it when the it is\n * an internal rewrite. Also we make sure the outgoing rewrite URL is\n * a data URL if the request was a data request.\n */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite');\n if (response && rewrite && (isRSCRequest || !isEdgeRendering)) {\n const destination = new NextURL(rewrite, {\n forceLocale: true,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) {\n if (destination.host === request.nextUrl.host) {\n destination.buildId = buildId || destination.buildId;\n response.headers.set('x-middleware-rewrite', String(destination));\n }\n }\n /**\n * When the request is a data request we must show if there was a rewrite\n * with an internal header so the client knows which component to load\n * from the data request.\n */ const { url: relativeDestination, isRelative } = parseRelativeURL(destination.toString(), requestURL.toString());\n if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite\n // resolving config is enabled don't add this header\n // so the upstream app can set it instead\n !(process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE && relativeDestination.match(/http(s)?:\\/\\//))) {\n response.headers.set('x-nextjs-rewrite', relativeDestination);\n }\n // If this is an RSC request, and the pathname or search has changed, and\n // this isn't an external rewrite, we need to set the rewritten pathname and\n // query headers.\n if (isRSCRequest && isRelative) {\n if (requestURL.pathname !== destination.pathname) {\n response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname);\n }\n if (requestURL.search !== destination.search) {\n response.headers.set(NEXT_REWRITTEN_QUERY_HEADER, // remove the leading ? from the search string\n destination.search.slice(1));\n }\n }\n }\n /**\n * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests,\n * unless it's already present. This is necessary to ensure that RSC hash validation\n * works correctly after a rewrite. For internal rewrites, the server can validate the\n * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical.\n * However, for external rewrites (where the request is proxied to another Next.js server),\n * the external server does not have access to the original URL or its search parameters.\n * In these cases, forwarding the `_rsc` parameter is essential so that the external server\n * can perform the correct RSC hash validation.\n */ if (response && rewrite && isRSCRequest && rscHash) {\n const rewriteURL = new URL(rewrite);\n if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) {\n rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash);\n response.headers.set('x-middleware-rewrite', rewriteURL.toString());\n }\n }\n /**\n * For redirects we will not include the locale in case when it is the\n * default and we must also make sure the outgoing URL is a data one if\n * the incoming request was a data request.\n */ const redirect = response == null ? void 0 : response.headers.get('Location');\n if (response && redirect && !isEdgeRendering) {\n const redirectURL = new NextURL(redirect, {\n forceLocale: false,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig\n });\n /**\n * Responses created from redirects have immutable headers so we have\n * to clone the response to be able to modify it.\n */ response = new Response(response.body, response);\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) {\n if (redirectURL.host === requestURL.host) {\n redirectURL.buildId = buildId || redirectURL.buildId;\n response.headers.set('Location', redirectURL.toString());\n }\n }\n /**\n * When the request is a data request we can't use the location header as\n * it may end up with CORS error. Instead we map to an internal header so\n * the client knows the destination.\n */ if (isNextDataRequest) {\n response.headers.delete('Location');\n response.headers.set('x-nextjs-redirect', getRelativeURL(redirectURL.toString(), requestURL.toString()));\n }\n }\n const finalResponse = response ? response : NextResponse.next();\n // Flight headers are not overridable / removable so they are applied at the end.\n const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers');\n const overwrittenHeaders = [];\n if (middlewareOverrideHeaders) {\n for (const [key, value] of flightHeaders){\n finalResponse.headers.set(`x-middleware-request-${key}`, value);\n overwrittenHeaders.push(key);\n }\n if (overwrittenHeaders.length > 0) {\n finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(','));\n }\n }\n return {\n response: finalResponse,\n waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(),\n fetchMetrics: request.fetchMetrics\n };\n}\n\n//# sourceMappingURL=adapter.js.map","import parseua from 'next/dist/compiled/ua-parser-js';\nexport function isBot(input) {\n return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input);\n}\nexport function userAgentFromString(input) {\n return {\n ...parseua(input),\n isBot: input === undefined ? false : isBot(input)\n };\n}\nexport function userAgent({ headers }) {\n return userAgentFromString(headers.get('user-agent') || undefined);\n}\n\n//# sourceMappingURL=user-agent.js.map","const GlobalURLPattern = // @ts-expect-error: URLPattern is not available in Node.js\ntypeof URLPattern === 'undefined' ? undefined : URLPattern;\nexport { GlobalURLPattern as URLPattern };\n\n//# sourceMappingURL=url-pattern.js.map","import { workAsyncStorage } from '../app-render/work-async-storage.external';\n/**\n * This function allows you to schedule callbacks to be executed after the current request finishes.\n */ export function after(task) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore\n throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), \"__NEXT_ERROR_CODE\", {\n value: \"E468\",\n enumerable: false,\n configurable: true\n });\n }\n const { afterContext } = workStore;\n return afterContext.after(task);\n}\n\n//# sourceMappingURL=after.js.map","export * from './after';\n\n//# sourceMappingURL=index.js.map","const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n","const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n","export function isHangingPromiseRejectionError(err) {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false;\n }\n return err.digest === HANGING_PROMISE_REJECTION;\n}\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION';\nclass HangingPromiseRejectionError extends Error {\n constructor(route, expression){\n super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;\n }\n}\nconst abortListenersBySignal = new WeakMap();\n/**\n * This function constructs a promise that will never resolve. This is primarily\n * useful for cacheComponents where we use promise resolution timing to determine which\n * parts of a render can be included in a prerender.\n *\n * @internal\n */ export function makeHangingPromise(signal, route, expression) {\n if (signal.aborted) {\n return Promise.reject(new HangingPromiseRejectionError(route, expression));\n } else {\n const hangingPromise = new Promise((_, reject)=>{\n const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression));\n let currentListeners = abortListenersBySignal.get(signal);\n if (currentListeners) {\n currentListeners.push(boundRejection);\n } else {\n const listeners = [\n boundRejection\n ];\n abortListenersBySignal.set(signal, listeners);\n signal.addEventListener('abort', ()=>{\n for(let i = 0; i < listeners.length; i++){\n listeners[i]();\n }\n }, {\n once: true\n });\n }\n });\n // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so\n // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct\n // your own promise out of it you'll need to ensure you handle the error when it rejects.\n hangingPromise.catch(ignoreReject);\n return hangingPromise;\n }\n}\nfunction ignoreReject() {}\nexport function makeDevtoolsIOAwarePromise(underlying) {\n // in React DevTools if we resolve in a setTimeout we will observe\n // the promise resolution as something that can suspend a boundary or root.\n return new Promise((resolve)=>{\n // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n setTimeout(()=>{\n resolve(underlying);\n }, 0);\n });\n}\n\n//# sourceMappingURL=dynamic-rendering-utils.js.map","export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__';\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__';\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__';\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__';\n\n//# sourceMappingURL=boundary-constants.js.map","// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n","/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n","import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \"searchParams\" inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \"searchParams\" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n","import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`connection\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n","// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\n])\n","import { createAsyncLocalStorage } from './async-local-storage';\nexport const actionAsyncStorageInstance = createAsyncLocalStorage();\n\n//# sourceMappingURL=action-async-storage-instance.js.map","// Share the instance module in the next-shared layer\nimport { actionAsyncStorageInstance } from './action-async-storage-instance' with {\n 'turbopack-transition': 'next-shared'\n};\nexport { actionAsyncStorageInstance as actionAsyncStorage };\n\n//# sourceMappingURL=action-async-storage.external.js.map","// ISC License\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\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// 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\nvar _globalThis;\nconst { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {};\nconst enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || (stdout == null ? void 0 : stdout.isTTY) && !env.CI && env.TERM !== 'dumb');\nconst replaceClose = (str, close, replace, index)=>{\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 ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\nconst formatter = (open, close, replace = open)=>{\n if (!enabled) return String;\n return (input)=>{\n const string = '' + input;\n const index = string.indexOf(close, open.length);\n return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;\n };\n};\nexport const reset = enabled ? (s)=>`\\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\n//# sourceMappingURL=picocolors.js.map","import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors';\nimport { LRUCache } from '../../server/lib/lru-cache';\nexport const prefixes = {\n wait: white(bold('○')),\n error: red(bold('⨯')),\n warn: yellow(bold('⚠')),\n ready: '▲',\n info: white(bold(' ')),\n event: green(bold('✓')),\n trace: magenta(bold('»'))\n};\nconst LOGGING_METHOD = {\n log: 'log',\n warn: 'warn',\n error: 'error'\n};\nfunction prefixedLog(prefixType, ...message) {\n if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n message.shift();\n }\n const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log';\n const prefix = prefixes[prefixType];\n // If there's no message, don't print the prefix but a new line\n if (message.length === 0) {\n console[consoleMethod]('');\n } else {\n // Ensure if there's ANSI escape codes it's concatenated into one string.\n // Chrome DevTool can only handle color if it's in one string.\n if (message.length === 1 && typeof message[0] === 'string') {\n console[consoleMethod](' ' + prefix + ' ' + message[0]);\n } else {\n console[consoleMethod](' ' + prefix, ...message);\n }\n }\n}\nexport function bootstrap(...message) {\n // logging format: ' '\n // e.g. ' ✓ Compiled successfully'\n // Add spaces to align with the indent of other logs\n console.log(' ' + message.join(' '));\n}\nexport function wait(...message) {\n prefixedLog('wait', ...message);\n}\nexport function error(...message) {\n prefixedLog('error', ...message);\n}\nexport function warn(...message) {\n prefixedLog('warn', ...message);\n}\nexport function ready(...message) {\n prefixedLog('ready', ...message);\n}\nexport function info(...message) {\n prefixedLog('info', ...message);\n}\nexport function event(...message) {\n prefixedLog('event', ...message);\n}\nexport function trace(...message) {\n prefixedLog('trace', ...message);\n}\nconst warnOnceCache = new LRUCache(10000, (value)=>value.length);\nexport function warnOnce(...message) {\n const key = message.join(' ');\n if (!warnOnceCache.has(key)) {\n warnOnceCache.set(key, key);\n warn(...message);\n }\n}\n\n//# sourceMappingURL=log.js.map","import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\n throw new InvariantError(\n `${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n","// Alias index file of next/server for edge runtime for tree-shaking purpose\nexport { ImageResponse } from '../spec-extension/image-response';\nexport { NextRequest } from '../spec-extension/request';\nexport { NextResponse } from '../spec-extension/response';\nexport { userAgent, userAgentFromString } from '../spec-extension/user-agent';\nexport { URLPattern } from '../spec-extension/url-pattern';\nexport { after } from '../../after';\nexport { connection } from '../../request/connection';\nexport { unstable_rootParams } from '../../request/root-params';\n\n//# sourceMappingURL=index.js.map","export * from '../server/web/exports/index';\n\n//# sourceMappingURL=server.js.map","import { NextResponse } from \"next/server\";\n\nconst WINDOW_MS = 60_000;\nconst MAX_PER_WINDOW = 100;\n\nconst hits = new Map();\n\nfunction getClientIp(request) {\n return request.headers.get(\"x-forwarded-for\")?.split(\",\")[0]?.trim()\n || request.headers.get(\"x-real-ip\")\n || \"127.0.0.1\";\n}\n\nfunction checkRateLimitLocal(key, max = MAX_PER_WINDOW, windowMs = WINDOW_MS) {\n const now = Date.now();\n if (!hits.has(key)) hits.set(key, []);\n const timestamps = hits.get(key).filter(t => now - t < windowMs);\n timestamps.push(now);\n hits.set(key, timestamps);\n return {\n allowed: timestamps.length <= max,\n remaining: Math.max(0, max - timestamps.length),\n reset: Math.ceil(now / 1000) + Math.ceil(windowMs / 1000)\n };\n}\n\nexport function middleware(request) {\n const { pathname } = request.nextUrl;\n if (!pathname.startsWith(\"/api/\")) return NextResponse.next();\n\n const ip = getClientIp(request);\n const useRedis = process.env.REDIS_URL && process.env.COSMIC_REDIS_ENABLED !== 'false';\n\n if (!useRedis) {\n const result = checkRateLimitLocal(`rl:${ip}`);\n if (!result.allowed) {\n return new NextResponse(JSON.stringify({ error: \"Too many requests. Try again shortly.\" }), {\n status: 429,\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-RateLimit-Limit\": String(MAX_PER_WINDOW),\n \"X-RateLimit-Remaining\": \"0\",\n \"X-RateLimit-Reset\": String(result.reset),\n \"Cache-Control\": \"no-store\"\n }\n });\n }\n const response = NextResponse.next();\n response.headers.set(\"X-RateLimit-Limit\", String(MAX_PER_WINDOW));\n response.headers.set(\"X-RateLimit-Remaining\", String(result.remaining));\n response.headers.set(\"X-RateLimit-Reset\", String(result.reset));\n return response;\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: \"/api/:path*\"\n};\n","export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n","export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n","import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n","import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n","import \"next/dist/server/web/globals\";\nimport { adapter } from \"next/dist/server/web/adapter\";\n// Import the userland code.\nimport * as _mod from \"private-next-root-dir/src/middleware.js\";\nimport { edgeInstrumentationOnRequestError } from \"next/dist/server/web/globals\";\nimport { isNextRouterError } from \"next/dist/client/components/is-next-router-error\";\nconst mod = {\n ..._mod\n};\nconst handler = mod.middleware || mod.default;\nconst page = \"/src/middleware\";\nif (typeof handler !== 'function') {\n throw Object.defineProperty(new Error(`The Middleware \"${page}\" must export a \\`middleware\\` or a \\`default\\` function`), \"__NEXT_ERROR_CODE\", {\n value: \"E120\",\n enumerable: false,\n configurable: true\n });\n}\n// Middleware will only sent out the FetchEvent to next server,\n// so load instrumentation module here and track the error inside middleware module.\nfunction errorHandledHandler(fn) {\n return async (...args)=>{\n try {\n return await fn(...args);\n } catch (err) {\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in middleware as it's outside of react component tree.\n if (process.env.NODE_ENV !== 'production') {\n if (isNextRouterError(err)) {\n err.message = `Next.js navigation API is not allowed to be used in Middleware.`;\n throw err;\n }\n }\n const req = args[0];\n const url = new URL(req.url);\n const resource = url.pathname + url.search;\n await edgeInstrumentationOnRequestError(err, {\n path: resource,\n method: req.method,\n headers: Object.fromEntries(req.headers.entries())\n }, {\n routerKind: 'Pages Router',\n routePath: '/middleware',\n routeType: 'middleware',\n revalidateReason: undefined\n });\n throw err;\n }\n };\n}\nexport default function nHandler(opts) {\n return adapter({\n ...opts,\n page,\n handler: errorHandledHandler(handler)\n });\n}\n\n//# sourceMappingURL=middleware.js.map\n","(()=>{\"use strict\";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n=\"~\";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!==\"function\"){throw new TypeError(\"The listener must be a function\")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t[\"default\"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t[\"default\"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name=\"TimeoutError\"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!==\"number\"||t<0){throw new TypeError(\"Expected `milliseconds` to be a positive number\")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n===\"function\"){try{i(n())}catch(e){s(e)}return}const r=typeof n===\"string\"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel===\"function\"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports[\"default\"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};(()=>{var e=n;Object.defineProperty(e,\"__esModule\",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap===\"number\"&&e.intervalCap>=1)){throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:\"\"}\\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:\"\"}\\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit(\"active\");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e===\"number\"&&e>=1)){throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit(\"add\")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e[\"default\"]=PQueue})();module.exports=n})();","module.exports = require(\"node:buffer\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n getTestReqInfo: null,\n withRequest: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n getTestReqInfo: function() {\n return getTestReqInfo;\n },\n withRequest: function() {\n return withRequest;\n }\n});\nconst _nodeasync_hooks = require(\"node:async_hooks\");\nconst testStorage = new _nodeasync_hooks.AsyncLocalStorage();\nfunction extractTestInfoFromRequest(req, reader) {\n const proxyPortHeader = reader.header(req, 'next-test-proxy-port');\n if (!proxyPortHeader) {\n return undefined;\n }\n const url = reader.url(req);\n const proxyPort = Number(proxyPortHeader);\n const testData = reader.header(req, 'next-test-data') || '';\n return {\n url,\n proxyPort,\n testData\n };\n}\nfunction withRequest(req, reader, fn) {\n const testReqInfo = extractTestInfoFromRequest(req, reader);\n if (!testReqInfo) {\n return fn();\n }\n return testStorage.run(testReqInfo, fn);\n}\nfunction getTestReqInfo(req, reader) {\n const testReqInfo = testStorage.getStore();\n if (testReqInfo) {\n return testReqInfo;\n }\n if (req && reader) {\n return extractTestInfoFromRequest(req, reader);\n }\n return undefined;\n}\n\n//# sourceMappingURL=context.js.map","/**\n * @license React\n * react.react-server.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar ReactSharedInternals = { H: null, A: null };\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty,\n assign = Object.assign;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n formatProdErrorMessage(\n 31,\n \"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array\n )\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nfunction createCacheRoot() {\n return new WeakMap();\n}\nfunction createCacheNode() {\n return { s: 0, v: void 0, o: null, p: null };\n}\nexports.Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children)) throw Error(formatProdErrorMessage(143));\n return children;\n }\n};\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.cache = function (fn) {\n return function () {\n var dispatcher = ReactSharedInternals.A;\n if (!dispatcher) return fn.apply(null, arguments);\n var fnMap = dispatcher.getCacheForType(createCacheRoot);\n dispatcher = fnMap.get(fn);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));\n fnMap = 0;\n for (var l = arguments.length; fnMap < l; fnMap++) {\n var arg = arguments[fnMap];\n if (\n \"function\" === typeof arg ||\n (\"object\" === typeof arg && null !== arg)\n ) {\n var objectCache = dispatcher.o;\n null === objectCache && (dispatcher.o = objectCache = new WeakMap());\n dispatcher = objectCache.get(arg);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher));\n } else\n (objectCache = dispatcher.p),\n null === objectCache && (dispatcher.p = objectCache = new Map()),\n (dispatcher = objectCache.get(arg)),\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()),\n objectCache.set(arg, dispatcher));\n }\n if (1 === dispatcher.s) return dispatcher.v;\n if (2 === dispatcher.s) throw dispatcher.v;\n try {\n var result = fn.apply(null, arguments);\n fnMap = dispatcher;\n fnMap.s = 1;\n return (fnMap.v = result);\n } catch (error) {\n throw ((result = dispatcher), (result.s = 2), (result.v = error), error);\n }\n };\n};\nexports.cacheSignal = function () {\n var dispatcher = ReactSharedInternals.A;\n return dispatcher ? dispatcher.cacheSignal() : null;\n};\nexports.captureOwnerStack = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(formatProdErrorMessage(267, element));\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useDebugValue = function () {};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.version = \"19.2.0-canary-0bdb9206-20250818\";\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1;\n }\n if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n cookiesSeparatorFound = true;\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n constructor(requestHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n this._headers = requestHeaders;\n const header = requestHeaders.get(\"cookie\");\n if (header) {\n const parsed = parseCookie(header);\n for (const [name, value] of parsed) {\n this._parsed.set(name, { name, value });\n }\n }\n }\n [Symbol.iterator]() {\n return this._parsed[Symbol.iterator]();\n }\n /**\n * The amount of cookies received from the client\n */\n get size() {\n return this._parsed.size;\n }\n get(...args) {\n const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(name);\n }\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed);\n if (!args.length) {\n return all.map(([_, value]) => value);\n }\n const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter(([n]) => n === name).map(([_, value]) => value);\n }\n has(name) {\n return this._parsed.has(name);\n }\n set(...args) {\n const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n const map = this._parsed;\n map.set(name, { name, value });\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n );\n return this;\n }\n /**\n * Delete the cookies matching the passed name or names in the request.\n */\n delete(names) {\n const map = this._parsed;\n const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n );\n return result;\n }\n /**\n * Delete all the cookies in the cookies in the request.\n */\n clear() {\n this.delete(Array.from(this._parsed.keys()));\n return this;\n }\n /**\n * Format the cookies in the request as a string for logging\n */\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n constructor(responseHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n var _a, _b, _c;\n this._headers = responseHeaders;\n const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n for (const cookieString of cookieStrings) {\n const parsed = parseSetCookie(cookieString);\n if (parsed)\n this._parsed.set(parsed.name, parsed);\n }\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n */\n get(...args) {\n const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(key);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n */\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed.values());\n if (!args.length) {\n return all;\n }\n const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter((c) => c.name === key);\n }\n has(name) {\n return this._parsed.has(name);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n */\n set(...args) {\n const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n const map = this._parsed;\n map.set(name, normalizeCookie({ name, value, ...cookie }));\n replace(map, this._headers);\n return this;\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n */\n delete(...args) {\n const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n }\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n }\n};\nfunction replace(bag, headers) {\n headers.delete(\"set-cookie\");\n for (const [, value] of bag) {\n const serialized = stringifyCookie(value);\n headers.append(\"set-cookie\", serialized);\n }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n if (typeof cookie.expires === \"number\") {\n cookie.expires = new Date(cookie.expires);\n }\n if (cookie.maxAge) {\n cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n }\n if (cookie.path === null || cookie.path === void 0) {\n cookie.path = \"/\";\n }\n return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestCookies,\n ResponseCookies,\n parseCookie,\n parseSetCookie,\n stringifyCookie\n});\n","(()=>{var i={226:function(i,e){(function(o,a){\"use strict\";var r=\"1.0.35\",t=\"\",n=\"?\",s=\"function\",b=\"undefined\",w=\"object\",l=\"string\",d=\"major\",c=\"model\",u=\"name\",p=\"type\",m=\"vendor\",f=\"version\",h=\"architecture\",v=\"console\",g=\"mobile\",k=\"tablet\",x=\"smarttv\",_=\"wearable\",y=\"embedded\",q=350;var T=\"Amazon\",S=\"Apple\",z=\"ASUS\",N=\"BlackBerry\",A=\"Browser\",C=\"Chrome\",E=\"Edge\",O=\"Firefox\",U=\"Google\",j=\"Huawei\",P=\"LG\",R=\"Microsoft\",M=\"Motorola\",B=\"Opera\",V=\"Samsung\",D=\"Sharp\",I=\"Sony\",W=\"Viera\",F=\"Xiaomi\",G=\"Zebra\",H=\"Facebook\",L=\"Chromium OS\",Z=\"Mac OS\";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]=\"iPad\";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!=\"Unknown\"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if(\"object\"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window===\"object\"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var o=__nccwpck_require__(226);module.exports=o})();","module.exports = require(\"node:async_hooks\");","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var r=e;\n/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function parse(e,r){if(typeof e!==\"string\"){throw new TypeError(\"argument str must be a string\")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn));\n}\n\n//# sourceMappingURL=server-edge.js.map","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.react-server.production.js');\n} else {\n module.exports = require('./cjs/react.react-server.development.js');\n}\n","(()=>{\"use strict\";var e={491:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);const i=\"context\";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},930:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);const c=\"diag\";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)(\"diag\");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r===\"number\"){r={logLevel:r}}const u=(0,i.getGlobal)(\"diag\");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:\"\";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)(\"diag\",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy(\"verbose\");e.debug=_logProxy(\"debug\");e.info=_logProxy(\"info\");e.warn=_logProxy(\"warn\");e.error=_logProxy(\"error\")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},653:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);const i=\"metrics\";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},181:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);const u=\"propagation\";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},997:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);const s=\"trace\";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},277:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)(\"OpenTelemetry Baggage Key\");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol(\"BaggageEntryMetadata\")},369:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!==\"string\"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=\"\"}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||\"DiagComponentLogger\"}debug(...e){return logProxy(\"debug\",this._namespace,e)}error(...e){return logProxy(\"error\",this._namespace,e)}info(...e){return logProxy(\"info\",this._namespace,e)}warn(...e){return logProxy(\"warn\",this._namespace,e)}verbose(...e){return logProxy(\"verbose\",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)(\"diag\");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:\"error\",c:\"error\"},{n:\"warn\",c:\"warn\"},{n:\"info\",c:\"info\"},{n:\"debug\",c:\"debug\"},{n:\"verbose\",c:\"trace\"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!==\"function\"){r=console.log}if(typeof r===\"function\"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,\"__esModule\",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a===\"function\"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc(\"error\",n.DiagLogLevel.ERROR),warn:_filterFunc(\"warn\",n.DiagLogLevel.WARN),info:_filterFunc(\"info\",n.DiagLogLevel.INFO),debug:_filterFunc(\"debug\",n.DiagLogLevel.DEBUG),verbose:_filterFunc(\"verbose\",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"ERROR\"]=30]=\"ERROR\";e[e[\"WARN\"]=50]=\"WARN\";e[e[\"INFO\"]=60]=\"INFO\";e[e[\"DEBUG\"]=70]=\"DEBUG\";e[e[\"VERBOSE\"]=80]=\"VERBOSE\";e[e[\"ALL\"]=9999]=\"ALL\"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(\".\")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ValueType=void 0;var r;(function(e){e[e[\"INT\"]=0]=\"INT\";e[e[\"DOUBLE\"]=1]=\"DOUBLE\"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis===\"object\"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e===\"object\"&&typeof e[\"spanId\"]===\"string\"&&typeof e[\"traceId\"]===\"string\"&&typeof e[\"traceFlags\"]===\"number\"}},124:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e[\"NOT_RECORD\"]=0]=\"NOT_RECORD\";e[e[\"RECORD\"]=1]=\"RECORD\";e[e[\"RECORD_AND_SAMPLED\"]=2]=\"RECORD_AND_SAMPLED\"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)(\"OpenTelemetry Context Key SPAN\");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=\",\";const c=\"=\";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.validateValue=t.validateKey=void 0;const r=\"[_0-9a-z-*/]\";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID=\"0000000000000000\";t.INVALID_TRACEID=\"00000000000000000000000000000000\";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanKind=void 0;var r;(function(e){e[e[\"INTERNAL\"]=0]=\"INTERNAL\";e[e[\"SERVER\"]=1]=\"SERVER\";e[e[\"CLIENT\"]=2]=\"CLIENT\";e[e[\"PRODUCER\"]=3]=\"PRODUCER\";e[e[\"CONSUMER\"]=4]=\"CONSUMER\"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e[\"UNSET\"]=0]=\"UNSET\";e[e[\"OK\"]=1]=\"OK\";e[e[\"ERROR\"]=2]=\"ERROR\"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"SAMPLED\"]=1]=\"SAMPLED\"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.VERSION=void 0;t.VERSION=\"1.6.0\"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var r={};(()=>{var e=r;Object.defineProperty(e,\"__esModule\",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,\"baggageEntryMetadataFromString\",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,\"createContextKey\",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,\"ROOT_CONTEXT\",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,\"DiagConsoleLogger\",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,\"DiagLogLevel\",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,\"createNoopMeter\",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,\"ValueType\",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,\"defaultTextMapGetter\",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,\"defaultTextMapSetter\",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,\"ProxyTracer\",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,\"ProxyTracerProvider\",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,\"SamplingDecision\",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,\"SpanKind\",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,\"SpanStatusCode\",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,\"TraceFlags\",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,\"createTraceState\",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,\"isSpanContextValid\",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,\"isValidTraceId\",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,\"isValidSpanId\",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,\"INVALID_SPANID\",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,\"INVALID_TRACEID\",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,\"INVALID_SPAN_CONTEXT\",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,\"context\",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,\"diag\",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,\"metrics\",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,\"propagation\",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,\"trace\",{enumerable:true,get:function(){return C.trace}});e[\"default\"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();"],"names":["removeTrailingSlash","route","replace","parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","substring","query","undefined","hash","slice","pathname","addPathPrefix","prefix","startsWith","addPathSuffix","suffix","pathHasPrefix","cache","WeakMap","normalizeLocalePath","locales","detectedLocale","lowercasedLocales","get","map","locale","toLowerCase","set","segments","split","segment","index","length","getNextPathnameInfo","options","result","basePath","i18n","trailingSlash","nextConfig","info","endsWith","removePathPrefix","withoutPrefix","pathnameNoDataPrefix","paths","buildId","join","parseData","i18nProvider","analyze","getHostname","hostname","headers","host","Array","isArray","toString","parsed","detectDomainLocale","domainItems","item","domainHostname","domain","defaultLocale","some","addLocale","ignorePrefix","lower","parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","NEXT_ROUTER_PREFETCH_HEADER","FLIGHT_HEADERS","isThenable","promise","then","InvariantError","Error","constructor","message","name","LRUCache","entry","size","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","debug","bind","reduce","isGroupSegment","React","unstable_postpone","isDynamicPostponeReason","reason","includes","createPostponeReason","expression","bodyAndImplicitTags","ROOT_LAYOUT_BOUNDARY_NAME","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","hits","Map","middleware","request","nextUrl","NextResponse","next","ip","getClientIp","trim","REDIS_URL","COSMIC_REDIS_ENABLED","checkRateLimitLocal","max","windowMs","WINDOW_MS","Date","now","has","key","timestamps","filter","t","push","allowed","remaining","Math","reset","ceil","JSON","stringify","error","status","String","MAX_PER_WINDOW","response","config","matcher","Set","values","HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED"],"sourceRoot":""} `relatedsourceMapdevelopment